converse.js
converse.js copied to clipboard
Disconnect of left-over connection triggers log-out
Describe the bug Converse.js treats the disconnect of an earlier connection attempt as a disconnect of the current session.
To Reproduce Steps to reproduce the behavior:
- Try to log in, but type the wrong password
- Login again but with the correct password
- Wait 5 minutes
- Converse.js gets disconnected out of the blue
Expected behavior Shouldn't get disconnected
Environment (please complete the following information):
- Converse.js version e896361b2
- Prosody trunk
- Websockets used
Additional context
What happens is that the first, failed, login attempt creates a new connection. Then, after Prosodys c2s_timeout, because this connection hasn't authenticated successfully yet, it gets disconnected.
However Converse.js created another connection during the second login attempt, and this connection carries on being fine since it's logged in.
Browser console says
ERROR: WebSocket stream error: connection-timeout
DEBUG: Status changed to: ERROR log.js:70:19
DEBUG: _doDisconnect was called log.js:70:19
DEBUG: WebSockets _doDisconnect was called log.js:70:19
DEBUG: Status changed to: DISCONNECTED log.js:70:19
DEBUG: DISCONNECTED log.js:70:19