Skip to content

Commit

Permalink
Merge pull request #1125 from MaOreoreorui/master
Browse files Browse the repository at this point in the history
[ISSUE #1124] fix: panic in SendResult.String
  • Loading branch information
francisoliverlee committed Mar 6, 2024
2 parents af567d2 + 7a89bba commit f4875c1
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 f4875c1

Please sign in to comment.