Commit Graph
1 Commits
Author SHA1 Message Date
Unshown 81cbda0d56 Fix TCP connection drops caused by thread interleaving in TCPSend
This commit addresses the mysterious connection drops that occur under heavy load.

1. Added `TCPSendMutex` to `TCPSend` in `VehicleEvent.cpp`.
While `UDPSend`, `GameSend`, and `CoreSend` all had dedicated mutexes, `TCPSend` was missing one. This allowed the background `AutoPing` thread to occasionally collide with the main event loop while sending data. This interleaving corrupted the TCP headers, causing the server to instantly terminate the connection due to malformed packets. `TCPSend` is now safely locked with a `std::scoped_lock`.
2026-08-24 13:23:50 +02:00