1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-12-22 12:54:53 -05:00

log.Fatal on failure to listen to SSH port (#10795)

Fix #10792
This commit is contained in:
zeripath 2020-03-23 07:59:38 +00:00 committed by GitHub
parent f036de5a94
commit 311ed516ce
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)