Skip to content

Commit

Permalink
fix: sending messages after connection
Browse files Browse the repository at this point in the history
  • Loading branch information
pgte committed Dec 7, 2017
1 parent 362eba4 commit e050c27
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ module.exports = class Connection extends EventEmitter {
if (this._connection) {
this._connection.push(encoding(message))
} else {
this.once('connect', () => this.push(message))
if (!this._connecting) {
this.once('connect', () => this.push(message))
this._getConnection()
}
}
Expand Down

0 comments on commit e050c27

Please sign in to comment.