perf(go): avoid mqtt raw hex duplication

This commit is contained in:
lingniu
2026-07-03 08:48:07 +08:00
parent 1830798d2e
commit d4c164480f
2 changed files with 12 additions and 2 deletions

View File

@@ -4,7 +4,6 @@ import (
"context"
"crypto/tls"
"crypto/x509"
"encoding/hex"
"errors"
"fmt"
"log/slog"
@@ -193,7 +192,6 @@ func (c *MQTTClient) handleMessage(ctx context.Context, topic string, payload []
EventTimeMS: receivedAtMS,
ReceivedAtMS: receivedAtMS,
RawText: string(payload),
RawHex: strings.ToUpper(hex.EncodeToString(payload)),
ParseStatus: envelope.ParseBadFrame,
ParseError: err.Error(),
}