From ab70394ced980e640a7ed9b8a9e8be79d5ed591e Mon Sep 17 00:00:00 2001 From: Andy Pan Date: Wed, 2 Oct 2024 18:51:25 +0800 Subject: [PATCH] chore: fix lint warnings of missing case in the `switch` statement --- eventloop_unix.go | 2 +- eventloop_windows.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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