Add in code to auto kill clients that have large buffers. This is disabled, and set to 5mb.

If enabled, this would silently kill players as their buffer is full, which could have bad consequences in large servers with lag.  This is intended to deal with the issue where servers are running out of memory.
This commit is contained in:
Zack Piispanen 2013-10-19 02:34:15 -04:00
parent 11edf7f61b
commit 078dca1f40
2 changed files with 10 additions and 0 deletions

View file

@ -274,6 +274,10 @@ namespace TShockAPI
[Description("Disables a player if this number of tiles is painted within 1 second.")] public int TilePaintThreshold = 15;
[Description("Enables max packet bufferer size.")] public bool EnableMaxBytesInBuffer = false;
[Description("Number of bytes in the packet buffer before we disconnect the player.")] public int MaxBytesInBuffer = 5242880;
/// <summary>
/// Reads a configuration file from a given path
/// </summary>