|
|
@ -16,7 +16,12 @@ func listen(server *ssh.Server) { |
|
|
|
|
|
|
|
|
|
|
|
err := gracefulServer.ListenAndServe(server.Serve) |
|
|
|
err := gracefulServer.ListenAndServe(server.Serve) |
|
|
|
if err != nil { |
|
|
|
if err != nil { |
|
|
|
|
|
|
|
select { |
|
|
|
|
|
|
|
case <-graceful.GetManager().IsShutdown(): |
|
|
|
log.Critical("Failed to start SSH server: %v", err) |
|
|
|
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) |
|
|
|
log.Info("SSH Listener: %s Closed", server.Addr) |
|
|
|
|
|
|
|
|
|
|
|