Atmosphere / atmosphere-javascript

atmosphere-javascript
Apache License 2.0
122 stars 98 forks source link

Allow closing the connection if state is OPEN or CONNECTING #206

Closed yerfinojul closed 7 years ago

yerfinojul commented 8 years ago

This was created to fix https://github.com/Atmosphere/atmosphere-javascript/issues/205

Basically if the websocket connectTimeout is triggered, but the connection is still established later, there is no way to close the websocket.

I think we should close it anyway as long as the state is OPEN or CONNECTING

yerfinojul commented 8 years ago

This looks like a simple change @jfarcand but please check, not sure what was the original reason for closing only when canSendMessage was true