Closed jeffallen closed 4 years ago
So go vet
is mad because ./websocket.go:224:7: the cancel function returned by context.WithDeadline should be called, not discarded, to avoid a context leak
. It seemed like due to async concerns I wouldn't be able to call that. Back to investigate more I guess.
Simply do
ctx, cancel := context.WithTimeout(context.Background(), 100 * time.Millisecond)
defer cancel()
w.server.SetKeepAlivesEnabled(false)
w.server.Shutdown(ctx)
I changed the settings of the repository to comply with Travis like I did for the other repos. I forgot to do it with onet.
Fixes #601.