Skip to content

Commit

Permalink
chore: fix lint warnings of missing case in the switch statement
Browse files Browse the repository at this point in the history
  • Loading branch information
panjf2000 committed Oct 2, 2024
1 parent cccef2c commit ab70394
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion eventloop_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion eventloop_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ab70394

Please sign in to comment.