Skip to content

Commit 977c404

Browse files
committed
Keep pause state when restoring container's status
Do not change pause state when restoring container's status, or status in docker will be different with status in runc. Signed-off-by: Fengtu Wang <[email protected]>
1 parent c0e6da7 commit 977c404

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

container/state.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,9 @@ func (s *State) SetRunning(pid int, initial bool) {
278278
s.ErrorMsg = ""
279279
s.Running = true
280280
s.Restarting = false
281-
s.Paused = false
281+
if initial {
282+
s.Paused = false
283+
}
282284
s.ExitCodeValue = 0
283285
s.Pid = pid
284286
if initial {

0 commit comments

Comments
 (0)