fix(idlewatcher): "unexpected container action" after unexpected EOF

This commit is contained in:
yusing 2025-05-02 04:56:27 +08:00
parent cd4c843025
commit 770c698332

View file

@ -265,8 +265,11 @@ func (w *Watcher) watchUntilDestroy() (returnCause gperr.Error) {
gperr.LogError("watcher error", err, &w.l)
case e := <-eventCh:
w.l.Debug().Stringer("action", e.Action).Msg("state changed")
if e.Action == events.ActionContainerDestroy {
switch e.Action {
case events.ActionContainerDestroy:
return causeContainerDestroy
case events.ActionForceReload:
continue
}
w.resetIdleTimer()
switch {