File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -93,6 +93,9 @@ func (daemon *Daemon) containerStop(ctx context.Context, ctr *container.Containe
93
93
defer cancel ()
94
94
95
95
if status := <- ctr .Wait (subCtx , containertypes .WaitConditionNotRunning ); status .Err () == nil {
96
+ // Ensure container status changes are committed by handler of container exit before returning control to the caller
97
+ ctr .Lock ()
98
+ defer ctr .Unlock ()
96
99
// container did exit, so ignore any previous errors and return
97
100
return nil
98
101
}
@@ -122,5 +125,9 @@ func (daemon *Daemon) containerStop(ctx context.Context, ctr *container.Containe
122
125
// container did exit, so ignore previous errors and continue
123
126
}
124
127
128
+ // Ensure container status changes are committed by handler of container exit before returning control to the caller
129
+ ctr .Lock ()
130
+ defer ctr .Unlock ()
131
+
125
132
return nil
126
133
}
You can’t perform that action at this time.
0 commit comments