mirror of
https://github.com/containers/podman.git
synced 2025-05-21 09:05:56 +08:00
Merge pull request #19533 from hangscer8/fix_waitPidStop_timer
Stop timer in function waitPidStop
This commit is contained in:
@ -1000,6 +1000,7 @@ func waitContainerStop(ctr *Container, timeout time.Duration) error {
|
||||
// Wait for a given PID to stop
|
||||
func waitPidStop(pid int, timeout time.Duration) error {
|
||||
timer := time.NewTimer(timeout)
|
||||
defer timer.Stop()
|
||||
for {
|
||||
select {
|
||||
case <-timer.C:
|
||||
|
Reference in New Issue
Block a user