3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-11-15 00:19:29 +01:00

move signals code to utils/

This commit is contained in:
Shivaram Lingamneni 2021-09-19 04:02:44 -04:00
parent 3cf1583aed
commit b0f412538c
3 changed files with 4 additions and 4 deletions

View File

@ -99,7 +99,7 @@ func NewServer(config *Config, logger *logger.Manager) (*Server, error) {
listeners: make(map[string]IRCListener),
logger: logger,
rehashSignal: make(chan os.Signal, 1),
exitSignals: make(chan os.Signal, len(ServerExitSignals)),
exitSignals: make(chan os.Signal, len(utils.ServerExitSignals)),
defcon: 5,
}
@ -114,7 +114,7 @@ func NewServer(config *Config, logger *logger.Manager) (*Server, error) {
}
// Attempt to clean up when receiving these signals.
signal.Notify(server.exitSignals, ServerExitSignals...)
signal.Notify(server.exitSignals, utils.ServerExitSignals...)
signal.Notify(server.rehashSignal, syscall.SIGHUP)
time.AfterFunc(alwaysOnExpirationPollPeriod, server.handleAlwaysOnExpirations)

View File

@ -4,7 +4,7 @@
// Copyright (c) 2020 Shivaram Lingamneni
// released under the MIT license
package irc
package utils
import (
"os"

View File

@ -4,7 +4,7 @@
// Copyright (c) 2020 Shivaram Lingamneni
// released under the MIT license
package irc
package utils
import (
"os"