mirror of
https://github.com/Xahau/xahau.js.git
synced 2026-08-23 16:40:52 +00:00
WebSocket isn't a Node-style EventEmitter in the browser
This commit is contained in:
@@ -255,7 +255,7 @@ Server.prototype.disconnect = function() {
|
||||
|
||||
Server.prototype.reconnect = function() {
|
||||
if (this._ws) {
|
||||
this._ws.once('close', this.connect.bind(this));
|
||||
this.once('disconnect', this.connect.bind(this));
|
||||
this.disconnect();
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user