File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
packages/cardano-services-client/src Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -400,7 +400,8 @@ export class CardanoWsClient extends WsProvider {
400400 if ( this . status === 'stop' ) this . closeResolver ( ) ;
401401 else {
402402 this . status = 'idle' ;
403- setTimeout ( ( ) => this . connect ( ) , 1000 ) . unref ( ) ;
403+ const timeout = setTimeout ( ( ) => this . connect ( ) , 1000 ) ;
404+ if ( typeof timeout . unref === 'function' ) timeout . unref ( ) ;
404405 }
405406
406407 this . emitHealth ( 'closed' ) ;
@@ -440,7 +441,7 @@ export class CardanoWsClient extends WsProvider {
440441 this . logger . error ( error , 'Error while refreshing heartbeat' , this . clientId ) ;
441442 }
442443 } , this . heartbeatInterval ) ;
443- this . heartbeatTimeout . unref ( ) ;
444+ if ( typeof this . heartbeatTimeout . unref === 'function' ) this . heartbeatTimeout . unref ( ) ;
444445 }
445446
446447 /** Closes the WebSocket connection. */
You can’t perform that action at this time.
0 commit comments