mirror of
https://github.com/ergochat/ergo.git
synced 2025-12-20 02:00:11 -08:00
remove utils.ConfigStore in favor of atomic.Pointer[T]
This commit is contained in:
parent
de1be675f5
commit
a99c8a42f9
3 changed files with 4 additions and 36 deletions
|
|
@ -15,6 +15,7 @@ import (
|
|||
"strconv"
|
||||
"strings"
|
||||
"sync"
|
||||
"sync/atomic"
|
||||
"syscall"
|
||||
"time"
|
||||
|
||||
|
|
@ -66,7 +67,7 @@ type Server struct {
|
|||
channels ChannelManager
|
||||
channelRegistry ChannelRegistry
|
||||
clients ClientManager
|
||||
config utils.ConfigStore[Config]
|
||||
config atomic.Pointer[Config]
|
||||
configFilename string
|
||||
connectionLimiter connection_limits.Limiter
|
||||
ctime time.Time
|
||||
|
|
@ -707,7 +708,7 @@ func (server *Server) applyConfig(config *Config) (err error) {
|
|||
config.Server.Cloaks.SetSecret(LoadCloakSecret(server.store))
|
||||
|
||||
// activate the new config
|
||||
server.config.Set(config)
|
||||
server.config.Store(config)
|
||||
|
||||
// load [dk]-lines, registered users and channels, etc.
|
||||
if initial {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue