WebSocket isn't a Node-style EventEmitter in the browser

This commit is contained in:
wltsmrz
2013-11-27 17:29:25 -08:00
parent 385113c2f5
commit 992b4c53b8

View File

@@ -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();
}
};