You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a WebSocket connection is closed cleanly by the other peer, no close event is raised on the WebSocket and the connection state remains on "OPEN" although it is actually closed. Attempting to send any data in this state has no effect.
An easy way of reproducing this behaviour is by starting the web-socket example after modifying the supplied chat server by adding connection.close(); in the "message" event.
On iOS, the close event is raised correctly with wasClean = true and code = 1000.
Additionally, closing the chat-server raises a "ECONNRESET (Connection reset by peer)" error and a close event with error code 1006, which indicates that no close control frame was received, on Android. On iOS, no error event is raised and the close event has the error code 1001
The text was updated successfully, but these errors were encountered:
We have fixed the problem in the Android side by forwarding the closing event to the js side and to correctly send the close code 1000 to the server.
I am a bit confused why closing the connection to an ios client on the server side would print 1001 on the server. The code printed should be the code provided in the connection.close(1000, 'default message') method. When no code and message is given 1000 is assumed.
When a WebSocket connection is closed cleanly by the other peer, no close event is raised on the WebSocket and the connection state remains on "OPEN" although it is actually closed. Attempting to send any data in this state has no effect.
An easy way of reproducing this behaviour is by starting the web-socket example after modifying the supplied chat server by adding
connection.close();
in the "message" event.On iOS, the close event is raised correctly with
wasClean = true
andcode = 1000
.Additionally, closing the chat-server raises a "ECONNRESET (Connection reset by peer)" error and a close event with error code 1006, which indicates that no close control frame was received, on Android. On iOS, no error event is raised and the close event has the error code 1001
The text was updated successfully, but these errors were encountered: