When trying to check for whether READYSTATE.CLOSED is set by running WebSocketImpl.isClosed(). READYSTATE is always set to CLOSING after initiating a close/closeConnection.
Expected Behavior
READYSTATE should be set to CLOSED regardless of whether the close was normal or abnormal.
Current Behavior
Whenever I query WebSocketImpl.isClosed(), I get false since READYSTATE is set to CLOSING regardless of whether the connection close was normal or abnormal.
Possible Solution
Check the WebSocketImpl.close(int, String, boolean) method and verify that the method does not return without transition READYSTATE from CLOSING to CLOSED.
Steps to Reproduce (for bugs)
- Create a Websocket client( and Websocket server if not already)
- Ensure that the connection is established between the server and the client.
- Stop Websocket server.
- Confirm whether
READYSTATE is set to CLOSED after the connection is lost or wait until it is set.
- Also check whether
READYSTATE is transitioned from CLOSING to CLOSED
Debug log (for bugs)
Context
I'm trying to re-establish a connection after a connection is lost.
Your Environment
- Version used: 1.3.7
- Java version: JDK 1.8.0
- Operating System and version: Ubuntu 16.4
- Endpoint Name and version:
- Link to your project: Closed source
When trying to check for whether
READYSTATE.CLOSEDis set by runningWebSocketImpl.isClosed().READYSTATEis always set toCLOSINGafter initiating a close/closeConnection.Expected Behavior
READYSTATEshould be set toCLOSEDregardless of whether the close was normal or abnormal.Current Behavior
Whenever I query
WebSocketImpl.isClosed(), I get false sinceREADYSTATEis set toCLOSINGregardless of whether the connection close was normal or abnormal.Possible Solution
Check the
WebSocketImpl.close(int, String, boolean)method and verify that the method does not return without transitionREADYSTATEfromCLOSINGtoCLOSED.Steps to Reproduce (for bugs)
READYSTATEis set toCLOSEDafter the connection is lost or wait until it is set.READYSTATEis transitioned fromCLOSINGtoCLOSEDDebug log (for bugs)
Context
I'm trying to re-establish a connection after a connection is lost.
Your Environment