Skip to content

Commit e1d63ae

Browse files
committed
fix: data race
1 parent d993b01 commit e1d63ae

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

main.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,12 @@ func main() {
4646
sig := <-sigChan
4747
ctx.Done()
4848
log.Println("exit requested, shutting down", "signal", sig)
49-
router.ShutdownWithTimeout(time.Second)
49+
50+
err := router.ShutdownWithTimeout(time.Second)
51+
if err != nil {
52+
log.Fatalln(err)
53+
}
54+
log.Println("server shutdown")
5055
}()
5156

5257
err = router.Listen(fmt.Sprintf(":%d", internal.AppCnf.Port))

0 commit comments

Comments
 (0)