File tree Expand file tree Collapse file tree 1 file changed +13
-9
lines changed
Crashlytics/Crashlytics/Components Expand file tree Collapse file tree 1 file changed +13
-9
lines changed Original file line number Diff line number Diff line change @@ -57,19 +57,23 @@ void FIRCLSBinaryImageInit(void) {
5757 memset (&_firclsContext.writable ->binaryImage , 0 , sizeof (_firclsContext.writable ->binaryImage ));
5858 _firclsContext.writable ->binaryImage .file .fd = -1 ;
5959
60- if (!FIRCLSUnlinkIfExists (_firclsContext.readonly ->binaryimage .path )) {
61- FIRCLSSDKLog (" Unable to reset the binary image log file %s \n " , strerror (errno));
62- }
63-
64- bool needsClosing; // unneeded
65- if (!FIRCLSBinaryImageOpenIfNeeded (&needsClosing)) {
66- FIRCLSSDKLog (" Error: Unable to open the binary image log file during init\n " );
67- }
60+ dispatch_async (FIRCLSGetBinaryImageQueue (), ^{
61+ if (!FIRCLSUnlinkIfExists (_firclsContext.readonly ->binaryimage .path )) {
62+ FIRCLSSDKLog (" Unable to reset the binary image log file %s \n " , strerror (errno));
63+ }
6864
69- FIRCLSFileClose (&_firclsContext.writable ->binaryImage .file );
65+ bool needsClosing; // unneeded
66+ if (!FIRCLSBinaryImageOpenIfNeeded (&needsClosing)) {
67+ FIRCLSSDKLog (" Error: Unable to open the binary image log file during init\n " );
68+ }
69+ });
7070
7171 _dyld_register_func_for_add_image (FIRCLSBinaryImageAddedCallback);
7272 _dyld_register_func_for_remove_image (FIRCLSBinaryImageRemovedCallback);
73+
74+ dispatch_async (FIRCLSGetBinaryImageQueue (), ^{
75+ FIRCLSFileClose (&_firclsContext.writable ->binaryImage .file );
76+ });
7377}
7478
7579static bool FIRCLSBinaryImageOpenIfNeeded (bool * needsClosing) {
You can’t perform that action at this time.
0 commit comments