Fixed router

This commit is contained in:
Sasha Koshka 2023-05-31 18:09:56 -04:00
parent 8a528e2b4e
commit 3cd53b3dd9

View File

@ -76,16 +76,16 @@ func main () {
} }
// be a daemon // be a daemon
daemon.ShutdownOnSigint() daemon.ShutdownOnSigint(&manager)
pidfile := daemon.PidFile(os.Getenv("HNAKRA_PIDFILE")) pidfile := daemon.PidFile(os.Getenv("HNAKRA_PIDFILE"))
if !pidfile.Empty() { if !pidfile.Empty() {
err := pidfile.Start() err := pidfile.Start()
if err != nil { log.Println("!!! could not write pid:", err) } if err != nil { log.Println("!!! could not write pid:", err) }
defer func () {
err := pidfile.Close()
if err != nil { log.Println("!!! could not delete pidfile:", err) }
} ()
} }
defer func () {
err := pidfile.Close()
if err != nil { log.Println("!!! could not delete pidfile:", err) }
} ()
// run servers // run servers
err = manager.Run() err = manager.Run()