Skip to content

Commit

Permalink
fix: panic in SendResult.String (#1124)
Browse files Browse the repository at this point in the history
  • Loading branch information
maoruilei3120 committed Dec 27, 2023
1 parent af567d2 commit 7a89bba
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion primitive/result.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,12 @@ func NewSendResult() *SendResult {

// SendResult send message result to string(detail result)
func (result *SendResult) String() string {
mq := "nil"
if result.MessageQueue != nil {
mq = result.MessageQueue.String()
}
return fmt.Sprintf("SendResult [sendStatus=%d, msgIds=%s, offsetMsgId=%s, queueOffset=%d, messageQueue=%s]",
result.Status, result.MsgID, result.OffsetMsgID, result.QueueOffset, result.MessageQueue.String())
result.Status, result.MsgID, result.OffsetMsgID, result.QueueOffset, mq)
}

// TransactionSendResult RocketMQ send result
Expand Down

0 comments on commit 7a89bba

Please sign in to comment.