3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-12-22 18:52:41 +01:00

notify on more signals

This commit is contained in:
Jeremy Latt 2014-03-02 11:51:29 -08:00
parent 2340464265
commit 92e7a7961f

View File

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