Skip to content

Commit e346d2d

Browse files
committed
fix: fixed error usage in ClientService
1 parent 3d3d7b7 commit e346d2d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/client/ClientService.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,9 @@ class ClientService {
3434
const conn = evt.detail;
3535
const streamHandler = (evt: wsEvents.EventWebSocketConnectionStream) => {
3636
const stream = evt.detail;
37+
// If the RPCServer is stopping or stopped then we want to reject new streams outright
3738
if (!this.rpcServer[running] || this.rpcServer[status] === 'stopping') {
38-
stream.cancel(Error('TMP RPCServer not running'));
39+
stream.cancel(new errors.ErrorClientServiceNotRunning());
3940
return;
4041
}
4142
this.rpcServer.handleStream(stream);

0 commit comments

Comments
 (0)