Skip to content

Commit

Permalink
use shuttingDown atomic bool instead of component state
Browse files Browse the repository at this point in the history
  • Loading branch information
pchila committed Oct 2, 2023
1 parent c23028c commit b233070
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/component/runtime/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -705,8 +705,8 @@ func (m *Manager) update(model component.Model, teardown bool) error {
var stoppedWg sync.WaitGroup
stoppedWg.Add(len(stop))
for _, existing := range stop {
if existing.getLatest().State == client.UnitStateStopped {
// it's already stopped, move on
if existing.shuttingDown.Load() {
// it's already shutting down, move on
stoppedWg.Done()
continue
}
Expand Down

0 comments on commit b233070

Please sign in to comment.