fix: should gracefully exit if failed to listen when reloading (#138)

This commit is contained in:
mzz 2023-06-11 16:58:55 +08:00 committed by GitHub
parent d5172bde64
commit f494373a30
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -121,6 +121,10 @@ loop:
switch sig {
case nil:
if reloading {
if listener == nil {
// Failed to listen. Exit.
break loop
}
// Serve.
reloading = false
log.Warnln("[Reload] Serve")