Skip to content

Commit 0a5cb18

Browse files
authored
Merge pull request moby#29015 from coolljt0725/fix_restore_panic
Fix docker restart panic on machine ungracefully shutdown
2 parents 3879ded + 267422e commit 0a5cb18

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libcontainerd/client_linux.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,7 @@ func (clnt *client) Restore(containerID string, attachStdio StdioCallback, optio
454454
if err != nil {
455455
logrus.Warnf("libcontainerd: failed to retrieve container %s state: %v", containerID, err)
456456
}
457-
if ev != nil && ev.Pid != InitFriendlyName || ev.Type != StateExit {
457+
if ev != nil && (ev.Pid != InitFriendlyName || ev.Type != StateExit) {
458458
// Wait a while for the exit event
459459
timeout := time.NewTimer(10 * time.Second)
460460
tick := time.NewTicker(100 * time.Millisecond)

0 commit comments

Comments
 (0)