Change logging in waitForSignalAndShutdown

This commit is contained in:
Martin Boehm 2018-05-29 12:38:04 +02:00
parent c74c4dd8ff
commit 01aa3d9074

View File

@ -406,12 +406,11 @@ func pushSynchronizationHandler(nt bchain.NotificationType) {
func waitForSignalAndShutdown(https *server.HTTPServer, socketio *server.SocketIoServer, chain bchain.BlockChain, timeout time.Duration) {
sig := <-chanOsSignal
glog.Infof("Shutdown: %v", sig)
ctx, cancel := context.WithTimeout(context.Background(), timeout)
defer cancel()
glog.Infof("Shutdown: %v", sig)
if https != nil {
if err := https.Shutdown(ctx); err != nil {
glog.Error("HttpServer.Shutdown error: ", err)