-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added an indicator to the OnClose to determine if
has been a clean/unclean close. Also added the same changes to the WebSocketHandler and DefaultWebSocketHandler for consistencies sake. #735
- Loading branch information
1 parent
d75b17c
commit 6d03262
Showing
5 changed files
with
20 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6d03262
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So if it's an unclean disconnect Disconnect never fires? What's the idea behind that?
6d03262
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it's an unclean disconnect we need to leave it for the Heartbeat to clean up. How it worked in the past is that it would disconnect and therefore be removed from the heartbeat before it was considered "timed out".
All of the other transports get cleaned up by the heartbeat when the client goes away. By not calling disconnect on an unclean disconnect we now make websockets like the other transports.
A pro to doing it this way is that if a client disconnects due to a network drop they are then allotted the 110 second (current config value) timeout period to reconnect to the server before their connection is removed from the connection pool.
6d03262
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add some comments to the code?
6d03262
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doneski! fcd1641