Add a graceful msg when CTRL+C is pressed. (#4248)

This commit is contained in:
Harshavardhana 2017-05-11 14:27:18 -07:00 committed by GitHub
parent fa3d5d0f46
commit 5a16dcf4cf
1 changed files with 1 additions and 0 deletions

View File

@ -102,6 +102,7 @@ func (m *ServerMux) handleServiceSignals() error {
} }
runExitFn(nil) runExitFn(nil)
case serviceStop: case serviceStop:
log.Println("Gracefully stopping... (press Ctrl+C again to force)")
if err := m.Close(); err != nil { if err := m.Close(); err != nil {
errorIf(err, "Unable to close server gracefully") errorIf(err, "Unable to close server gracefully")
} }