Skip to content

Commit dfa7c26

Browse files
committed
chore: close the stop channel first
Signed-off-by: Bo-Yi Wu <[email protected]>
1 parent e696c33 commit dfa7c26

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

redis.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,9 +205,9 @@ func (s *Worker) Shutdown() error {
205205
}
206206

207207
s.stopOnce.Do(func() {
208+
close(s.stop)
208209
s.pubsub.Close()
209210
s.rdb.Close()
210-
close(s.stop)
211211
})
212212
return nil
213213
}

0 commit comments

Comments
 (0)