Merge pull request #11 from KoenLav/re-order-close

First close then invoke close event handler
This commit is contained in:
Nikita
2021-01-23 14:20:05 +03:00
committed by GitHub
3 changed files with 3 additions and 3 deletions

View File

@@ -76,8 +76,8 @@ public class SocketAdapterImpl implements SocketAdapter {
@Override @Override
public void close() throws IOException { public void close() throws IOException {
this.invokeCloseEventHandler(false);
this.socket.close(); this.socket.close();
this.invokeCloseEventHandler(false);
} }
@Override @Override

View File

@@ -266,8 +266,8 @@ int writeTimeoutSeconds = 5.0;
} }
- (void)close { - (void)close {
self.closeEventHandler(FALSE);
[self closeStreams]; [self closeStreams];
self.closeEventHandler(FALSE);
} }
- (void)closeStreams { - (void)closeStreams {

View File

@@ -80,8 +80,8 @@ namespace Blocshop.ScoketsForCordova
public void Close() public void Close()
{ {
this.CloseEventHandler(false);
this.socket.Close(); this.socket.Close();
this.CloseEventHandler(false);
} }
private void StartReadTask() private void StartReadTask()