Skip to content

Commit

Permalink
fix: dont try to send msg over dead conn
Browse files Browse the repository at this point in the history
  • Loading branch information
Elin Angelow committed Feb 3, 2024
1 parent 8f0c12c commit 6a9b631
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/wss.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ const Wss = ({
}
return;
}
if (!this.connection(message.params.connectionId)) {
throw new Error('noTargetConnectionFound');
}
// request, it will wait for response, and send data back
// here we are creating response matcher also
const rq = this.requestAdd(message.params.connectionId, message);
Expand Down

0 comments on commit 6a9b631

Please sign in to comment.