mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
config watcher fix (#7772)
This commit is contained in:
@@ -221,7 +221,7 @@ func InitializeConfigWatch() {
|
||||
if event.Op&fsnotify.Write == fsnotify.Write || event.Op&fsnotify.Create == fsnotify.Create {
|
||||
l4g.Info(fmt.Sprintf("Config file watcher detected a change reloading %v", CfgFileName))
|
||||
|
||||
if configReadErr := viper.ReadInConfig(); configReadErr == nil {
|
||||
if _, configReadErr := ReadConfigFile(CfgFileName, true); configReadErr == nil {
|
||||
LoadGlobalConfig(CfgFileName)
|
||||
} else {
|
||||
l4g.Error(fmt.Sprintf("Failed to read while watching config file at %v with err=%v", CfgFileName, configReadErr.Error()))
|
||||
|
||||
Reference in New Issue
Block a user