mirror of
https://github.com/ergochat/ergo.git
synced 2024-11-10 22:19:31 +01:00
notify on more signals
This commit is contained in:
parent
2340464265
commit
92e7a7961f
@ -52,14 +52,15 @@ func NewServer(config *Config) *Server {
|
|||||||
timeout: make(chan *Client, 16),
|
timeout: make(chan *Client, 16),
|
||||||
}
|
}
|
||||||
|
|
||||||
signal.Notify(server.signals, syscall.SIGINT, syscall.SIGHUP)
|
|
||||||
|
|
||||||
server.loadChannels()
|
server.loadChannels()
|
||||||
|
|
||||||
for _, listenerConf := range config.Listeners {
|
for _, listenerConf := range config.Listeners {
|
||||||
go server.listen(listenerConf)
|
go server.listen(listenerConf)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
signal.Notify(server.signals, syscall.SIGINT, syscall.SIGHUP,
|
||||||
|
syscall.SIGTERM, syscall.SIGQUIT)
|
||||||
|
|
||||||
return server
|
return server
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user