fix: Fixes stalled connections and infinite throttle (#1796)
> [!Warning] > **Developer Warning** > The `PacketThrottle` callback return value is now reversed. `true` indicates the connection is _throttled_. ### Summary - Fixes an issue where connections get stalled forever - Fixes an issue where the throttler is not working properly - Removes account attack limiter - Rewrites IP limiter - Removes IP restrictions (they weren't used, and not practical) - Fixes issue where IP limiter was counting before firewall was blocking. View without whitespace: https://github.com/modernuo/ModernUO/pull/1796/files?diff=split&w=1
This commit is contained in:
parent
ccad915464
commit
a4522b9d43
13 changed files with 1538 additions and 1783 deletions
|
|
@ -823,9 +823,9 @@ public partial class NetState : IComparable<NetState>, IValueLinkListNode<NetSta
|
|||
var throttler = handler.ThrottleCallback;
|
||||
if (throttler != null)
|
||||
{
|
||||
if (!throttler(packetId, this, out bool drop))
|
||||
if (throttler(packetId, this))
|
||||
{
|
||||
return drop ? ParserState.Throttled : ParserState.AwaitingNextPacket;
|
||||
return ParserState.Throttled;
|
||||
}
|
||||
|
||||
SetPacketTime(packetId);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue