aboutsummaryrefslogtreecommitdiffstats
path: root/modules/ssh
diff options
context:
space:
mode:
Diffstat (limited to 'modules/ssh')
-rw-r--r--modules/ssh/ssh_graceful.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/modules/ssh/ssh_graceful.go b/modules/ssh/ssh_graceful.go
index f8370ab4db..a30e6fc297 100644
--- a/modules/ssh/ssh_graceful.go
+++ b/modules/ssh/ssh_graceful.go
@@ -16,7 +16,12 @@ func listen(server *ssh.Server) {
err := gracefulServer.ListenAndServe(server.Serve)
if err != nil {
- log.Critical("Failed to start SSH server: %v", err)
+ select {
+ case <-graceful.GetManager().IsShutdown():
+ log.Critical("Failed to start SSH server: %v", err)
+ default:
+ log.Fatal("Failed to start SSH server: %v", err)
+ }
}
log.Info("SSH Listener: %s Closed", server.Addr)