mirror of
https://github.com/gin-gonic/gin.git
synced 2025-10-22 17:42:14 +08:00
Update README.md
This commit is contained in:
parent
983b0c2bed
commit
909ccd2ccf
@ -1673,7 +1673,12 @@ func main() {
|
|||||||
if err := srv.Shutdown(ctx); err != nil {
|
if err := srv.Shutdown(ctx); err != nil {
|
||||||
log.Fatal("Server Shutdown:", err)
|
log.Fatal("Server Shutdown:", err)
|
||||||
}
|
}
|
||||||
log.Println("Server exiting")
|
// catching ctx.Done(). timeout of 5 seconds.
|
||||||
|
select {
|
||||||
|
case <-ctx.Done():
|
||||||
|
log.Println("timeout of 5 seconds.")
|
||||||
|
}
|
||||||
|
log.Println("Server exiting")
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user