From 1392190d475da449799555d51404a81d99d833a2 Mon Sep 17 00:00:00 2001 From: Zorg Date: Tue, 21 Jun 2016 19:04:01 -0400 Subject: [PATCH] Make sure SULog delivers messages synchronously --- Sparkle/SULog.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Sparkle/SULog.m b/Sparkle/SULog.m index 561408f5..8d25506d 100644 --- a/Sparkle/SULog.m +++ b/Sparkle/SULog.m @@ -43,7 +43,8 @@ void SULog(NSString *format, ...) NSString *logMessage = [[NSString alloc] initWithFormat:format arguments:ap]; va_end(ap); - dispatch_async(queue, ^{ + // Make sure we do not async, because if we async, the log may not be delivered deterministically + dispatch_sync(queue, ^{ aslmsg message = asl_new(ASL_TYPE_MSG); if (message == NULL) { return;