Skip to content

Commit 00bfd44

Browse files
committed
Bug fix for issue robbiehanson#102 - Stack overflow while writing data. Also addresses issue robbiehanson#115 & issue robbiehanson#216. Thanks to teerapap for the patch. (it's being used with the addition of an autoreleasepool)
1 parent d321c5c commit 00bfd44

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

GCD/GCDAsyncSocket.m

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5550,7 +5550,10 @@ - (void)doWriteData
55505550

55515551
if (!error)
55525552
{
5553-
[self maybeDequeueWrite];
5553+
dispatch_async(socketQueue, ^{ @autoreleasepool{
5554+
5555+
[self maybeDequeueWrite];
5556+
}});
55545557
}
55555558
}
55565559
else

0 commit comments

Comments
 (0)