mirror of https://github.com/gin-gonic/gin.git
Update document
Fix wrong example code in the graceful shutdown section.
This commit is contained in:
parent
580e7da6ee
commit
e32c48e396
|
@ -1818,7 +1818,7 @@ func main() {
|
|||
// Initializing the server in a goroutine so that
|
||||
// it won't block the graceful shutdown handling below
|
||||
go func() {
|
||||
if err := srv.ListenAndServe(); err != nil && errors.Is(err, http.ErrServerClosed) {
|
||||
if err := srv.ListenAndServe(); err != nil && !errors.Is(err, http.ErrServerClosed) {
|
||||
log.Printf("listen: %s\n", err)
|
||||
}
|
||||
}()
|
||||
|
|
Loading…
Reference in New Issue