mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2025-07-03 16:25:35 +00:00
Filtering spam packets
This commit is contained in:
parent
8b755e6b7b
commit
dad1acbb91
@ -343,7 +343,9 @@ bool TNetwork::TCPSend(TClient& c, const std::string& Data, bool IsSync) {
|
|||||||
if (!IsSync) {
|
if (!IsSync) {
|
||||||
if (c.IsSyncing()) {
|
if (c.IsSyncing()) {
|
||||||
//std::unique_lock Lock(c.MissedPacketQueueMutex());
|
//std::unique_lock Lock(c.MissedPacketQueueMutex());
|
||||||
|
if(!Data.empty() && Data.at(0) != 'S') {
|
||||||
c.EnqueueMissedPacketDuringSyncing(Data);
|
c.EnqueueMissedPacketDuringSyncing(Data);
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
} else if (!c.IsSyncing() && c.IsSynced() && c.MissedPacketQueueSize() != 0) {
|
} else if (!c.IsSyncing() && c.IsSynced() && c.MissedPacketQueueSize() != 0) {
|
||||||
debug("sending " + std::to_string(c.MissedPacketQueueSize()) + " missed packets");
|
debug("sending " + std::to_string(c.MissedPacketQueueSize()) + " missed packets");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user