mirror of
https://github.com/novnc/noVNC.git
synced 2026-06-08 21:34:38 +00:00
Fix disconnect/reconnect issues
Commit 155d78b399 prevented reconnections
from working properly. This fixes that by creating a new RFB object
after disconnecting or failing.
Furthermore, this ensures that a new connection cannot be opened util
we've actually disconnected (either by timer or by receiving a `close`
event).
Closes #452
This commit is contained in:
@@ -482,6 +482,7 @@ var RFB;
|
||||
Util.Debug("Clearing disconnect timer");
|
||||
clearTimeout(this._disconnTimer);
|
||||
this._disconnTimer = null;
|
||||
this._sock.off('close'); // make sure we don't get a double event
|
||||
}
|
||||
|
||||
switch (state) {
|
||||
|
||||
Reference in New Issue
Block a user