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

Fix crash on disconnect & deallocation #109

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions SocketIO.m
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,8 @@ - (void) disconnect
else if (_isConnecting) {
[_handshake cancel];
}

[self onDisconnect: nil];
}

- (void) sendMessage:(NSString *)data
Expand Down Expand Up @@ -762,10 +764,14 @@ - (void) connection:(NSURLConnection *)connection

- (void) dealloc
{
[_handshake cancel];
_handshake = nil;

_host = nil;
_sid = nil;
_endpoint = nil;

_transport.delegate = nil;
_transport = nil;

[_timeout invalidate];
Expand Down