The current implementation of the "onclose" event on a WebSocket connection does not check the WebSocket close event code.
This means that if a connection closes with any other code than 1000, the SDK still consider this event as a normal disconnection and does not retry connecting automatically.