Skip to content

Commit

Permalink
fix: fixed error usage in ClientService
Browse files Browse the repository at this point in the history
  • Loading branch information
tegefaulkes committed Feb 6, 2025
1 parent 3d3d7b7 commit e346d2d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/client/ClientService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ class ClientService {
const conn = evt.detail;
const streamHandler = (evt: wsEvents.EventWebSocketConnectionStream) => {
const stream = evt.detail;
// If the RPCServer is stopping or stopped then we want to reject new streams outright
if (!this.rpcServer[running] || this.rpcServer[status] === 'stopping') {
stream.cancel(Error('TMP RPCServer not running'));
stream.cancel(new errors.ErrorClientServiceNotRunning());
return;
}
this.rpcServer.handleStream(stream);
Expand Down

0 comments on commit e346d2d

Please sign in to comment.