Fix checkpoint status for message taking long warnings

This commit is contained in:
Tulir Asokan 2022-06-30 14:50:22 +03:00
parent 2542f94e00
commit 14581a314e

View file

@ -195,6 +195,9 @@ func (portal *Portal) sendMessageMetrics(evt *event.Event, err error, part strin
portal.log.Logfln(level, "%s %s %s from %s: %v", part, msgType, evtDescription, evt.Sender, err) portal.log.Logfln(level, "%s %s %s from %s: %v", part, msgType, evtDescription, evt.Sender, err)
reason, isCertain, _, sendNotice := errorToStatusReason(err) reason, isCertain, _, sendNotice := errorToStatusReason(err)
status := bridge.ReasonToCheckpointStatus(reason) status := bridge.ReasonToCheckpointStatus(reason)
if errors.Is(err, errMessageTakingLong) {
status = bridge.MsgStatusWillRetry
}
portal.bridge.SendMessageCheckpoint(evt, bridge.MsgStepRemote, err, status, ms.getRetryNum()) portal.bridge.SendMessageCheckpoint(evt, bridge.MsgStepRemote, err, status, ms.getRetryNum())
if sendNotice { if sendNotice {
ms.setNoticeID(portal.sendErrorMessage(err, isCertain, ms.getNoticeID())) ms.setNoticeID(portal.sendErrorMessage(err, isCertain, ms.getNoticeID()))