mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
JS: Better deal with buggy WebSocket implementations.
This commit is contained in:
@@ -110,6 +110,9 @@ Server.prototype.connect = function ()
|
||||
self.emit('socket_close');
|
||||
self._set_state('offline');
|
||||
|
||||
// Prevent additional events from this socket
|
||||
ws.onopen = ws.onerror = ws.onclose = ws.onmessage = function () {};
|
||||
|
||||
// Should we be connected?
|
||||
if (!self._should_connect) return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user