Don't wait for websocket closes on failure
RFB._fail() can be called at any time in any state, it is not certain that we will get a close event on the socket since the socket might not be open. This caused us to hit the disconnect timeout in such cases. Fixes issue #678
This commit is contained in:
parent
b2e961d48d
commit
9f909d9b46
|
@ -572,7 +572,11 @@
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
this._rfb_disconnect_reason = msg;
|
this._rfb_disconnect_reason = msg;
|
||||||
|
|
||||||
|
// Transition to disconnected without waiting for socket to close
|
||||||
this._updateConnectionState('disconnecting');
|
this._updateConnectionState('disconnecting');
|
||||||
|
this._updateConnectionState('disconnected');
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue