mirror of
https://github.com/jeremyd/ergo.git
synced 2026-06-12 07:43:31 -07:00
notify on more signals
This commit is contained in:
+3
-2
@@ -52,14 +52,15 @@ func NewServer(config *Config) *Server {
|
||||
timeout: make(chan *Client, 16),
|
||||
}
|
||||
|
||||
signal.Notify(server.signals, syscall.SIGINT, syscall.SIGHUP)
|
||||
|
||||
server.loadChannels()
|
||||
|
||||
for _, listenerConf := range config.Listeners {
|
||||
go server.listen(listenerConf)
|
||||
}
|
||||
|
||||
signal.Notify(server.signals, syscall.SIGINT, syscall.SIGHUP,
|
||||
syscall.SIGTERM, syscall.SIGQUIT)
|
||||
|
||||
return server
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user