File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed
Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -950,9 +950,11 @@ export class RunExecution {
950950 }
951951
952952 this . isShuttingDown = true ;
953+
953954 this . snapshotPoller ?. stop ( ) ;
954- this . taskRunProcess ?. onTaskRunHeartbeat . detach ( ) ;
955955 this . snapshotManager ?. cleanup ( ) ;
956+
957+ this . taskRunProcess ?. unsafeDetachEvtHandlers ( ) ;
956958 }
957959
958960 private async handleSuspendable ( suspendableSnapshot : SnapshotState ) {
Original file line number Diff line number Diff line change @@ -97,6 +97,13 @@ export class TaskRunProcess {
9797 return this . _isPreparedForNextAttempt ;
9898 }
9999
100+ unsafeDetachEvtHandlers ( ) {
101+ this . onExit . detach ( ) ;
102+ this . onIsBeingKilled . detach ( ) ;
103+ this . onSendDebugLog . detach ( ) ;
104+ this . onSetSuspendable . detach ( ) ;
105+ }
106+
100107 async cancel ( ) {
101108 this . _isPreparedForNextRun = false ;
102109 this . _isBeingCancelled = true ;
You can’t perform that action at this time.
0 commit comments