From 201ab93376f835944c8dab3eadaaca15627e21ed Mon Sep 17 00:00:00 2001 From: Daniel Yates Date: Thu, 2 May 2024 11:30:07 +0100 Subject: [PATCH] Consume bandwidth on successful immediate sends If the message gets throttled and placed into the queue, it shouldn't result in the despool loop having less bandwidth to play with. --- AceComm-3.0/ChatThrottleLib.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AceComm-3.0/ChatThrottleLib.lua b/AceComm-3.0/ChatThrottleLib.lua index df8a11c..e59942c 100644 --- a/AceComm-3.0/ChatThrottleLib.lua +++ b/AceComm-3.0/ChatThrottleLib.lua @@ -572,11 +572,11 @@ function ChatThrottleLib:SendAddonMessage(prio, prefix, text, chattype, target, -- Check if there's room in the global available bandwidth gauge to send directly if not self.bQueueing and nSize < self:UpdateAvail() then - self.avail = self.avail - nSize local sendResult = PerformSend(_G.C_ChatInfo.SendAddonMessage, prefix, text, chattype, target) if not WasMessageThrottled(sendResult) then local didSend = (sendResult == SendAddonMessageResult.Success) + self.avail = self.avail - nSize self.Prio[prio].nTotalSent = self.Prio[prio].nTotalSent + nSize if callbackFn then