Skip to content

Commit

Permalink
Bug fix for TURNSocket. Fixes issue #98
Browse files Browse the repository at this point in the history
  • Loading branch information
robbiehanson committed Sep 1, 2011
1 parent 398951c commit 9dcc510
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Extensions/XEP-0065/TURNSocket.m
Expand Up @@ -1020,12 +1020,14 @@ - (void)targetNextConnect


proxyPort = [[[streamhost attributeForName:@"port"] stringValue] intValue]; proxyPort = [[[streamhost attributeForName:@"port"] stringValue] intValue];


NSAssert([asyncSocket isDisconnected], @"Expecting the socket to be disconnected at this point...");

if (asyncSocket == nil) if (asyncSocket == nil)
{ {
asyncSocket = [[GCDAsyncSocket alloc] initWithDelegate:self delegateQueue:turnQueue]; asyncSocket = [[GCDAsyncSocket alloc] initWithDelegate:self delegateQueue:turnQueue];
} }
else
{
NSAssert([asyncSocket isDisconnected], @"Expecting the socket to be disconnected at this point...");
}


XMPPLogVerbose(@"TURNSocket: targetNextConnect: %@(%@:%hu)", [proxyJID full], proxyHost, proxyPort); XMPPLogVerbose(@"TURNSocket: targetNextConnect: %@(%@:%hu)", [proxyJID full], proxyHost, proxyPort);


Expand Down

0 comments on commit 9dcc510

Please sign in to comment.