mirror of
https://github.com/go-gitea/gitea
synced 2024-12-22 16:44:21 +01:00
parent
f036de5a94
commit
311ed516ce
1 changed files with 6 additions and 1 deletions
|
@ -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 {
|
||||||
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)
|
log.Info("SSH Listener: %s Closed", server.Addr)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue