Explorar el Código

debug changes

Abhishek Kondur hace 1 año
padre
commit
ca48f21a2e
Se han modificado 1 ficheros con 6 adiciones y 5 borrados
  1. 6 5
      mq/util.go

+ 6 - 5
mq/util.go

@@ -73,14 +73,15 @@ func encryptMsg(host *models.Host, msg []byte) ([]byte, error) {
 }
 
 func publish(host *models.Host, dest string, msg []byte) error {
-	encrypted, encryptErr := encryptMsg(host, msg)
-	if encryptErr != nil {
-		return encryptErr
-	}
+	// encrypted, encryptErr := encryptMsg(host, msg)
+	// if encryptErr != nil {
+	// 	return encryptErr
+	// }
 	if mqclient == nil {
 		return errors.New("cannot publish ... mqclient not connected")
 	}
-	if token := mqclient.Publish(dest, 0, true, encrypted); !token.WaitTimeout(MQ_TIMEOUT*time.Second) || token.Error() != nil {
+
+	if token := mqclient.Publish(dest, 0, true, msg); !token.WaitTimeout(MQ_TIMEOUT*time.Second) || token.Error() != nil {
 		var err error
 		if token.Error() == nil {
 			err = errors.New("connection timeout")