Browse Source

use local variable for mq configuration

Abhishek Kondur 2 years ago
parent
commit
6b8d633386
2 changed files with 3 additions and 1 deletions
  1. 2 0
      mq/dynsec.go
  2. 1 1
      mq/dynsec_helper.go

+ 2 - 0
mq/dynsec.go

@@ -132,7 +132,9 @@ func encodePasswordToPBKDF2(password string, salt string, iterations int, keyLen
 
 
 // Configure - configures the dynamic initial configuration for MQ
 // Configure - configures the dynamic initial configuration for MQ
 func Configure() error {
 func Configure() error {
+
 	logger.Log(0, "Configuring MQ...")
 	logger.Log(0, "Configuring MQ...")
+	dynConfig := dynConfigInI
 	path := functions.GetNetmakerPath() + ncutils.GetSeparator() + dynamicSecurityFile
 	path := functions.GetNetmakerPath() + ncutils.GetSeparator() + dynamicSecurityFile
 
 
 	password := servercfg.GetMqAdminPassword()
 	password := servercfg.GetMqAdminPassword()

+ 1 - 1
mq/dynsec_helper.go

@@ -26,7 +26,7 @@ const (
 
 
 var (
 var (
 	// default configuration of dynamic security
 	// default configuration of dynamic security
-	dynConfig = dynJSON{
+	dynConfigInI = dynJSON{
 		Clients: []client{
 		Clients: []client{
 			{
 			{
 				Username:   mqAdminUserName,
 				Username:   mqAdminUserName,