Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check if connection is open on sendPing & change readystate on closeConnection #610

Merged
merged 5 commits into from
Nov 18, 2017

Conversation

marci4
Copy link
Collaborator

@marci4 marci4 commented Nov 15, 2017

Description

Check in the timertask to make sure that a connection is really open.
closeConnection() can also adjust the readystate to closing, if the closecode is CloseFrame.Abnormal_Close and the connection is still open

Related Issue

#606
Fixes #609

Motivation and Context

#606 caused an exception
#609 just looked messy. But was no real problem due to closeConnection() changing the readystate to closed at the end

How Has This Been Tested?

Tested against demo project. Waiting for user feedback

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@marci4 marci4 merged commit ca85bbf into TooTallNate:master Nov 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

A connection will be in readystate Open when onWebSocketClose is called
1 participant