mirror of
https://github.com/kemko/nomad.git
synced 2026-01-08 11:25:41 +03:00
prevent races when reloading, fully shut down raft
This commit is contained in:
@@ -803,6 +803,9 @@ func (a *Agent) Reload(newConfig *Config) error {
|
||||
|
||||
// GetConfigCopy creates a replica of the agent's config, excluding locks
|
||||
func (a *Agent) GetConfig() *Config {
|
||||
a.configLock.Lock()
|
||||
defer a.configLock.Unlock()
|
||||
|
||||
return a.config
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user