Skip to content
This repository was archived by the owner on May 14, 2024. It is now read-only.

Commit d90e34a

Browse files
committed
Merge commit '4ccb970ee78d34230ee8241878332125b83ed130' into develop
+ adjust it a bit. close #109. # Via Stepan Generalov * commit '4ccb970ee78d34230ee8241878332125b83ed130': SocketIO: don't use NSURLConnection delegate property in -dealloc - not available without BlocksKit Ensure to cleanup properly in -disconnect & -dealloc - fixes crashes
2 parents 6b48221 + 4ccb970 commit d90e34a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

SocketIO.m

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ - (void) disconnect
162162
}
163163
else if (_isConnecting) {
164164
[_handshake cancel];
165+
[self onDisconnect: nil];
165166
}
166167
}
167168

@@ -786,10 +787,14 @@ - (void) connection:(NSURLConnection *)connection
786787

787788
- (void) dealloc
788789
{
790+
[_handshake cancel];
791+
_handshake = nil;
792+
789793
_host = nil;
790794
_sid = nil;
791795
_endpoint = nil;
792796

797+
_transport.delegate = nil;
793798
_transport = nil;
794799

795800
[_timeout invalidate];

0 commit comments

Comments
 (0)