Skip to content

Commit ff73df9

Browse files
committed
better
1 parent 9f5ffeb commit ff73df9

File tree

1 file changed

+9
-13
lines changed

1 file changed

+9
-13
lines changed

Crashlytics/Crashlytics/Components/FIRCLSBinaryImage.m

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -57,23 +57,19 @@ void FIRCLSBinaryImageInit(void) {
5757
memset(&_firclsContext.writable->binaryImage, 0, sizeof(_firclsContext.writable->binaryImage));
5858
_firclsContext.writable->binaryImage.file.fd = -1;
5959

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-
}
60+
if (!FIRCLSUnlinkIfExists(_firclsContext.readonly->binaryimage.path)) {
61+
FIRCLSSDKLog("Unable to reset the binary image log file %s\n", strerror(errno));
62+
}
6463

65-
bool needsClosing; // unneeded
66-
if (!FIRCLSBinaryImageOpenIfNeeded(&needsClosing)) {
67-
FIRCLSSDKLog("Error: Unable to open the binary image log file during init\n");
68-
}
69-
});
64+
bool needsClosing; // unneeded
65+
if (!FIRCLSBinaryImageOpenIfNeeded(&needsClosing)) {
66+
FIRCLSSDKLog("Error: Unable to open the binary image log file during init\n");
67+
}
68+
69+
FIRCLSFileClose(&_firclsContext.writable->binaryImage.file);
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-
});
7773
}
7874

7975
static bool FIRCLSBinaryImageOpenIfNeeded(bool* needsClosing) {

0 commit comments

Comments
 (0)