forked from External/ergo
notify on more signals
This commit is contained in:
parent
2340464265
commit
92e7a7961f
1 changed files with 3 additions and 2 deletions
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue