Skip to content

Commit 9b02cc8

Browse files
committed
server crash with no ecryption key
1 parent 79aaa8e commit 9b02cc8

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

cluster/cluster.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -289,11 +289,7 @@ func (cluster *Cluster) Init(confs *config.ConfVersion, cfgGroup string, tlog *s
289289
cluster.Confs = confs
290290

291291
cluster.Conf = confs.ConfInit
292-
k, _ := cluster.Conf.LoadEncrytionKey()
293-
if k == nil {
294-
cluster.LogPrintf(LvlInfo, "No existing password encryption key")
295-
cluster.SetState("ERR00090", state.State{ErrType: "WARNING", ErrDesc: fmt.Sprintf(cluster.GetErrorList()["ERR00090"]), ErrFrom: "CLUSTER"})
296-
}
292+
297293
cluster.tlog = tlog
298294
cluster.htlog = loghttp
299295
cluster.termlength = termlength
@@ -302,7 +298,11 @@ func (cluster *Cluster) Init(confs *config.ConfVersion, cfgGroup string, tlog *s
302298
cluster.runUUID = runUUID
303299
cluster.repmgrHostname = repmgrHostname
304300
cluster.repmgrVersion = repmgrVersion
305-
301+
k, _ := cluster.Conf.LoadEncrytionKey()
302+
if k == nil {
303+
cluster.LogPrintf(LvlInfo, "No existing password encryption key")
304+
cluster.SetState("ERR00090", state.State{ErrType: "WARNING", ErrDesc: fmt.Sprintf(cluster.GetErrorList()["ERR00090"]), ErrFrom: "CLUSTER"})
305+
}
306306
cluster.InitFromConf()
307307

308308
return nil

0 commit comments

Comments
 (0)