cmd/stepd: Surpress some go vet warnings
This commit is contained in:
parent
f8b739ac4d
commit
ce6c5b6285
@ -201,16 +201,15 @@ func main () {
|
||||
}
|
||||
|
||||
// set up the HTTP server
|
||||
httpServer := http.Server {
|
||||
httpServer := httpServerRoutine {
|
||||
Addr: config.Get("http.address"),
|
||||
Handler: &handler,
|
||||
}
|
||||
httpServerRoutine := httpServerRoutine(httpServer)
|
||||
|
||||
// set up the routine manager
|
||||
manager := routines.Manager {
|
||||
Routines: []routines.Routine {
|
||||
&httpServerRoutine,
|
||||
&httpServer,
|
||||
},
|
||||
}
|
||||
|
||||
@ -230,9 +229,10 @@ func (this *httpServerRoutine) Run (ctx context.Context) error {
|
||||
server := http.Server(*this)
|
||||
go func () {
|
||||
<- ctx.Done()
|
||||
shutdownCtx, _ := context.WithTimeout (
|
||||
shutdownCtx, done := context.WithTimeout (
|
||||
context.Background(),
|
||||
16 * time.Second)
|
||||
defer done()
|
||||
server.Shutdown(shutdownCtx)
|
||||
} ()
|
||||
err := server.ListenAndServe()
|
||||
|
Loading…
Reference in New Issue
Block a user