mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-12-06 17:27:59 +00:00
Merge pull request #695 from lumberj/fix-typo
Fix typo in common/connection.js
This commit is contained in:
@@ -81,7 +81,7 @@ class Connection extends EventEmitter {
|
||||
}
|
||||
// we don't want this inside the try/catch or exceptions in listener
|
||||
// will be caught
|
||||
this.emit.apply(this, parameters);
|
||||
this.emit(...parameters);
|
||||
}
|
||||
|
||||
get _state() {
|
||||
@@ -178,7 +178,7 @@ class Connection extends EventEmitter {
|
||||
// event is also emitted when then underlying net.Socket closes the
|
||||
// connection (end or close)."
|
||||
this._ws.on('error', error =>
|
||||
this.emit('error', 'websocket', error.messsage, error));
|
||||
this.emit('error', 'websocket', error.message, error));
|
||||
this._ws.on('message', this._onMessage.bind(this));
|
||||
// in browser close event can came before open event, so we must
|
||||
// resolve connect's promise after reconnect in that case.
|
||||
|
||||
Reference in New Issue
Block a user