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:
parent
11edf7f61b
commit
078dca1f40
2 changed files with 10 additions and 0 deletions
|
|
@ -182,6 +182,12 @@ namespace TShockAPI
|
|||
{
|
||||
buffers[socket.whoAmI].AddRange(ms.ToArray());
|
||||
}
|
||||
|
||||
if (TShock.Config.EnableMaxBytesInBuffer && buffers[socket.whoAmI].Count > TShock.Config.MaxBytesInBuffer)
|
||||
{
|
||||
buffers[socket.whoAmI].Clear();
|
||||
socket.kill = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue