mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2025-07-03 08:15:35 +00:00
remove SO_SNDTIMEO for now
This commit is contained in:
parent
95ae0f5d03
commit
c42a523532
@ -152,7 +152,7 @@ void TNetwork::TCPServerMain() {
|
|||||||
if (ec) {
|
if (ec) {
|
||||||
beammp_errorf("failed to accept: {}", ec.what());
|
beammp_errorf("failed to accept: {}", ec.what());
|
||||||
}
|
}
|
||||||
ClientSocket.set_option(boost::asio::detail::socket_option::integer<SOL_SOCKET, SO_SNDTIMEO> { 30 * 1000 }, ec);
|
//ClientSocket.set_option(boost::asio::detail::socket_option::integer<SOL_SOCKET, SO_SNDTIMEO> { 30 * 1000 }, ec);
|
||||||
if (!ec) {
|
if (!ec) {
|
||||||
beammp_errorf("failed to set send timeout on client socket: {}", ec.what());
|
beammp_errorf("failed to set send timeout on client socket: {}", ec.what());
|
||||||
}
|
}
|
||||||
@ -457,15 +457,11 @@ void TNetwork::Looper(const std::weak_ptr<TClient>& c) {
|
|||||||
} // end locked context
|
} // end locked context
|
||||||
// beammp_debug("sending a missed packet: " + QData);
|
// beammp_debug("sending a missed packet: " + QData);
|
||||||
if (!TCPSend(*Client, QData, true)) {
|
if (!TCPSend(*Client, QData, true)) {
|
||||||
if (!Client->IsDisconnected())
|
Client->Disconnect("Failed to TCPSend while clearing the missed packet queue");
|
||||||
Client->Disconnect("Failed to TCPSend while clearing the missed packet queue");
|
std::unique_lock lock(Client->MissedPacketQueueMutex());
|
||||||
{
|
while (!Client->MissedPacketQueue().empty()) {
|
||||||
std::unique_lock lock(Client->MissedPacketQueueMutex());
|
Client->MissedPacketQueue().pop();
|
||||||
while (!Client->MissedPacketQueue().empty()) {
|
|
||||||
Client->MissedPacketQueue().pop();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
Client->Disconnect("WHY THE FUCK NOT");
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user