WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   AddonMessage Flooding/Mass Disconnects? (https://www.wowinterface.com/forums/showthread.php?t=57709)

Roeshambo 11-30-19 12:00 AM

AddonMessage Flooding/Mass Disconnects?
 
My addon is using the addon channels to communicate quite a bit of data. For each player in a guild, it's generally only a 200 or less character message. But everyone in the guild sends those messages almost simultaneously. Additionally, all players process each message sent from everyone else (incredibly quick if statement). I've been told that shortly after login, an entire guild got disconnected by the addon. Which is approximately when those messages fire. This appears to only occur in larger guilds (60+ players online). Are there any stipulations on the 255 character limit that anyone is aware of that limits the number of characters all players in a guild can send before it's considered "flooding" and causes a disconnect? Or does anyone have any knowledge regarding this that I may be completely overlooking?

Kanegasi 11-30-19 01:08 AM

It's not the data you're sending, it's how often you're sending it. Because each message triggers a quick response, several messages at once cause the disconnect. You need to throttle successive messages, either by using ChatThrottleLib or a flat delay between each message. If you're going with a flat delay without the lib, you need to make sure all of your addon's communication is delayed, as in one output function and not delayed by type. If I recall correctly from testing I've done long ago, 0.05 seconds is the lowest you can safely delay (about 3 frames @ 60 fps). I would use a 0.1 second delay just in case, maybe even 1 second.

Roeshambo 11-30-19 01:58 AM

I do use ChatThrottleLib, which is why the disconnects had me a bit confused. It's not the frequency that is causing the disconnects. It's been tested at length in medium size guilds with no issues. It's not until a large guild uses it where disconnects suddenly become a problem. And it's not a handful of people here and there go offline. Every single player in the guild using the addon gets DCd. Simultaneously. At least, that's how it's been explained to me by those that experienced it.


All times are GMT -6. The time now is 02:54 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI