forked from External/ergo
Merge pull request #1949 from slingamn/generic_config.2
genericize atomic config changes
This commit is contained in:
commit
d5814c10ab
3 changed files with 36 additions and 9 deletions
|
|
@ -17,7 +17,6 @@ import (
|
|||
"sync"
|
||||
"syscall"
|
||||
"time"
|
||||
"unsafe"
|
||||
|
||||
"github.com/ergochat/irc-go/ircfmt"
|
||||
"github.com/okzk/sdnotify"
|
||||
|
|
@ -66,7 +65,7 @@ type Server struct {
|
|||
channels ChannelManager
|
||||
channelRegistry ChannelRegistry
|
||||
clients ClientManager
|
||||
config unsafe.Pointer
|
||||
config utils.ConfigStore[Config]
|
||||
configFilename string
|
||||
connectionLimiter connection_limits.Limiter
|
||||
ctime time.Time
|
||||
|
|
@ -706,7 +705,7 @@ func (server *Server) applyConfig(config *Config) (err error) {
|
|||
config.Server.Cloaks.SetSecret(LoadCloakSecret(server.store))
|
||||
|
||||
// activate the new config
|
||||
server.SetConfig(config)
|
||||
server.config.Set(config)
|
||||
|
||||
// load [dk]-lines, registered users and channels, etc.
|
||||
if initial {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue