Skip to content

Commit ad71802

Browse files
authored
Merge pull request moby#39794 from tao12345666333/cleanup-set-dead-func
cleanup: remove SetDead function
2 parents 700722f + f8f6f7c commit ad71802

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

container/state.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -366,13 +366,6 @@ func (s *State) IsRemovalInProgress() bool {
366366
return res
367367
}
368368

369-
// SetDead sets the container state to "dead"
370-
func (s *State) SetDead() {
371-
s.Lock()
372-
s.Dead = true
373-
s.Unlock()
374-
}
375-
376369
// IsDead returns whether the Dead flag is set. Used by Container to check whether a container is dead.
377370
func (s *State) IsDead() bool {
378371
s.Lock()

container/state_test.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,9 @@ func TestStateRunStop(t *testing.T) {
109109
}
110110

111111
// Set the state to dead and removed.
112-
s.SetDead()
112+
s.Lock()
113+
s.Dead = true
114+
s.Unlock()
113115
s.SetRemoved()
114116

115117
// Wait for removed status or timeout.

0 commit comments

Comments
 (0)