diff --git a/src/ios/SocketsForCordova/Classes/SocketAdapter.m b/src/ios/SocketsForCordova/Classes/SocketAdapter.m index ac2c97b..734ff33 100644 --- a/src/ios/SocketsForCordova/Classes/SocketAdapter.m +++ b/src/ios/SocketsForCordova/Classes/SocketAdapter.m @@ -266,8 +266,8 @@ int writeTimeoutSeconds = 5.0; } - (void)close { - self.closeEventHandler(FALSE); [self closeStreams]; + self.closeEventHandler(FALSE); } - (void)closeStreams { diff --git a/src/wp8/src/SocketAdapter.cs b/src/wp8/src/SocketAdapter.cs index e61e1a7..fbbd27d 100644 --- a/src/wp8/src/SocketAdapter.cs +++ b/src/wp8/src/SocketAdapter.cs @@ -80,8 +80,8 @@ namespace Blocshop.ScoketsForCordova public void Close() { - this.CloseEventHandler(false); this.socket.Close(); + this.CloseEventHandler(false); } private void StartReadTask()