Update server.go

This commit is contained in:
ffhelicopter 2018-09-05 23:31:37 +08:00 committed by GitHub
parent d3c6fecb57
commit 71ef1798c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,4 +1,4 @@
// +build go1.8 // +build go1.11
package main package main
@ -47,6 +47,7 @@ func main() {
// catching ctx.Done(). timeout of 5 seconds. // catching ctx.Done(). timeout of 5 seconds.
select { select {
case <-ctx.Done(): case <-ctx.Done():
log.Println("timeout of 5 seconds.")
} }
log.Println("Server exiting") log.Println("Server exiting")
} }