mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2026-10-23 08:30:49 +00:00
Filtering spam packets
This commit is contained in:
1 parent
8b755e6b7b
commit
dad1acbb91
1 file changed
+3
-1
+3
-1
@@ -343,7 +343,9 @@ bool TNetwork::TCPSend(TClient& c, const std::string& Data, bool IsSync) {
|
||||
if (!IsSync) {
|
||||
if (c.IsSyncing()) {
|
||||
//std::unique_lock Lock(c.MissedPacketQueueMutex());
|
||||
c.EnqueueMissedPacketDuringSyncing(Data);
|
||||
if(!Data.empty() && Data.at(0) != 'S') {
|
||||
c.EnqueueMissedPacketDuringSyncing(Data);
|
||||
}
|
||||
return true;
|
||||
} else if (!c.IsSyncing() && c.IsSynced() && c.MissedPacketQueueSize() != 0) {
|
||||
debug("sending " + std::to_string(c.MissedPacketQueueSize()) + " missed packets");
|
||||
|
||||
Reference in new issue
Block a user