agent: send MWARN on QUOTA errors (#1176)

* agent: send MWARN on QUOTA errors

* fix tests
This commit is contained in:
Evgeny Poberezkin
2024-05-28 11:56:57 +01:00
committed by GitHub
parent 4a96dbf871
commit 199f85ec62
3 changed files with 8 additions and 1 deletions
+5 -1
View File
@@ -1344,7 +1344,11 @@ runSmpQueueMsgDelivery c@AgentClient {subQ} ConnData {connId} sq (Worker {doWork
AM_CONN_INFO_REPLY -> connError msgId NOT_AVAILABLE
_ -> do
expireTs <- addUTCTime (-quotaExceededTimeout) <$> liftIO getCurrentTime
if internalTs < expireTs then notifyDelMsgs msgId e expireTs else retrySndMsg RISlow
if internalTs < expireTs
then notifyDelMsgs msgId e expireTs
else do
notify $ MWARN (unId msgId) e
retrySndMsg RISlow
SMP _ SMP.AUTH -> case msgType of
AM_CONN_INFO -> connError msgId NOT_AVAILABLE
AM_CONN_INFO_REPLY -> connError msgId NOT_AVAILABLE