|
@@ -3,6 +3,7 @@ package mq
|
|
|
import (
|
|
|
"errors"
|
|
|
"fmt"
|
|
|
+ "runtime"
|
|
|
"strings"
|
|
|
"time"
|
|
|
|
|
@@ -73,6 +74,13 @@ func encryptMsg(host *models.Host, msg []byte) ([]byte, error) {
|
|
|
}
|
|
|
|
|
|
func publish(host *models.Host, dest string, msg []byte) error {
|
|
|
+ if len(msg) == 0 {
|
|
|
+ pc, _, _, ok := runtime.Caller(1)
|
|
|
+ details := runtime.FuncForPC(pc)
|
|
|
+ if ok && details != nil {
|
|
|
+ fmt.Printf("\n------> ####$$$ Called from %s\n", details.Name())
|
|
|
+ }
|
|
|
+ }
|
|
|
// encrypted, encryptErr := encryptMsg(host, msg)
|
|
|
// if encryptErr != nil {
|
|
|
// return encryptErr
|