diff --git a/eventloop_unix.go b/eventloop_unix.go index 97475302c..0897485d6 100644 --- a/eventloop_unix.go +++ b/eventloop_unix.go @@ -293,7 +293,7 @@ func (el *eventloop) ticker(ctx context.Context) { for { delay, action = el.eventHandler.OnTick() switch action { - case None: + case None, Close: case Shutdown: // It seems reasonable to mark this as low-priority, waiting for some tasks like asynchronous writes // to finish up before shutting down the service. diff --git a/eventloop_windows.go b/eventloop_windows.go index 565f3ef30..906d8924f 100644 --- a/eventloop_windows.go +++ b/eventloop_windows.go @@ -155,7 +155,7 @@ func (el *eventloop) ticker(ctx context.Context) { for { delay, action = el.eventHandler.OnTick() switch action { - case None: + case None, Close: case Shutdown: if !shutdown { shutdown = true