Skip to content

Commit

Permalink
fix #46
Browse files Browse the repository at this point in the history
  • Loading branch information
devsnek committed Sep 7, 2019
1 parent 3444ac2 commit 59099df
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@ class RPCClient extends EventEmitter {
resolve(this);
});
this.transport.once('close', () => {
this._expecting.forEach((e) => {
e.reject(new Error('connection closed'));
});
this.emit('disconnected');
reject();
});
Expand Down

0 comments on commit 59099df

Please sign in to comment.