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
commit 62d86857b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

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

View File

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

View File

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