fix: Mark cooldown request

This commit is contained in:
rtw1x1
2026-01-21 18:31:43 +00:00
parent b04f360612
commit aabb6d0945
2 changed files with 4 additions and 2 deletions

View File

@@ -360,7 +360,9 @@ bool CGuildMarkDownloader::__SendMarkCRCList()
TPacketCGMarkCRCList kPacketMarkCRCList;
if (!CGuildMarkManager::Instance().GetBlockCRCList(m_currentRequestingImageIndex, kPacketMarkCRCList.crclist))
{
__CompleteState_Set();
}
else
{
kPacketMarkCRCList.header = HEADER_CG_MARK_CRCLIST;

View File

@@ -3946,12 +3946,12 @@ bool CPythonNetworkStream::RecvMarkUpdate()
Tracef(" >> RecvMarkUpdate: guildID=%u, imgIdx=%u\n", packet.guildID, packet.imgIdx);
// Rate limit mark downloads to prevent connection spam from multiple simultaneous guild uploads
// Allow at most one download request per 5 seconds from server-pushed updates
// Allow at most one download request per 1 second from server-pushed updates
DWORD dwCurrentTime = ELTimer_GetMSec();
if (dwCurrentTime < gs_dwMarkUpdateRequestTime)
return true;
gs_dwMarkUpdateRequestTime = dwCurrentTime + 5000; // 5 second cooldown
gs_dwMarkUpdateRequestTime = dwCurrentTime + 1000; // 1 second cooldown
CGuildMarkDownloader& rkGuildMarkDownloader = CGuildMarkDownloader::Instance();
rkGuildMarkDownloader.Connect(m_kMarkAuth.m_kNetAddr, m_kMarkAuth.m_dwHandle, m_kMarkAuth.m_dwRandomKey);