Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fixed issue #102 - stack overflow in doWriteData->maybeDequeueWrite->doW... #115

Closed
wants to merge 1 commit into from

2 participants

@teerapap

I dispatch [self maybeDequeueWrite] asynchronously to socketQueue to break the recursive calls.

@robbiehanson robbiehanson referenced this pull request from a commit
@robbiehanson Bug fix for issue #102 - Stack overflow while writing data. Also addr…
…esses issue #115 & issue #216. Thanks to teerapap for the patch. (it's being used with the addition of an autoreleasepool)
00bfd44
@robbiehanson

Thank you for the patch! Sorry it took so long to get this merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 14, 2012
  1. Fixed issue #102 - stack overflow in doWriteData->maybeDequeueWrite->…

    Teerapap Changwichukarn authored
    …doWriteData->..
This page is out of date. Refresh to see the latest.
Showing with 3 additions and 1 deletion.
  1. +3 −1 GCD/GCDAsyncSocket.m
View
4 GCD/GCDAsyncSocket.m
@@ -5644,7 +5644,9 @@ - (void)doWriteData
if (!error)
{
- [self maybeDequeueWrite];
+ dispatch_async(socketQueue, ^{
+ [self maybeDequeueWrite];
+ });
}
}
else
Something went wrong with that request. Please try again.