Skip to content
This repository has been archived by the owner on May 8, 2024. It is now read-only.

Commit

Permalink
Terminal wrapper: exit on terminal expiration (#195)
Browse files Browse the repository at this point in the history
  • Loading branch information
edigaryev committed Dec 7, 2021
1 parent 73166ba commit a656cd0
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions internal/executor/terminalwrapper/terminalwrapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,9 @@ func (wrapper *Wrapper) Wait() chan Operation {
})

if numActiveSessions == 0 {
break
wrapper.operationChan <- &ExitOperation{Success: true}

return
}

message := fmt.Sprintf("Waited %.1f seconds, but there are still %d terminal sessions open "+
Expand All @@ -160,10 +162,10 @@ func (wrapper *Wrapper) Wait() chan Operation {

continue
case <-wrapper.ctx.Done():
break
}
wrapper.operationChan <- &ExitOperation{Success: false}

wrapper.operationChan <- &ExitOperation{Success: true}
return
}
}
}()

Expand Down

0 comments on commit a656cd0

Please sign in to comment.