mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2026-04-03 06:16:04 +00:00
Revert "Skip invalid socket when accept() fails"
This reverts commit 83afafc0c3.
This commit is contained in:
@@ -243,11 +243,10 @@ void TNetwork::TCPServerMain() {
|
||||
ip::tcp::socket ClientSocket = Acceptor.accept(ClientEp, ec);
|
||||
if (ec) {
|
||||
beammp_errorf("Failed to accept() new client: {}", ec.message());
|
||||
continue;
|
||||
}
|
||||
TConnection Conn { std::move(ClientSocket), ClientEp };
|
||||
std::thread ID(&TNetwork::Identify, this, std::move(Conn));
|
||||
ID.detach();
|
||||
ID.detach(); // TODO: Add to a queue and attempt to join periodically
|
||||
} catch (const std::exception& e) {
|
||||
beammp_errorf("Exception in accept routine: {}", e.what());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user