From 9dcc5108d9ba9e287b2eac26a1827921ac8c7250 Mon Sep 17 00:00:00 2001 From: Robbie Hanson Date: Thu, 1 Sep 2011 08:10:41 -0700 Subject: [PATCH] Bug fix for TURNSocket. Fixes issue #98 --- Extensions/XEP-0065/TURNSocket.m | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Extensions/XEP-0065/TURNSocket.m b/Extensions/XEP-0065/TURNSocket.m index ed27ac8641..6b822f249f 100644 --- a/Extensions/XEP-0065/TURNSocket.m +++ b/Extensions/XEP-0065/TURNSocket.m @@ -1020,12 +1020,14 @@ - (void)targetNextConnect proxyPort = [[[streamhost attributeForName:@"port"] stringValue] intValue]; - NSAssert([asyncSocket isDisconnected], @"Expecting the socket to be disconnected at this point..."); - if (asyncSocket == nil) { 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);