mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2026-04-21 15:40:33 +00:00
fix crash when the client disconnects while sending first identify setting
This commit is contained in:
@@ -173,7 +173,7 @@ void TNetwork::Identify(TConnection&& RawConnection) {
|
|||||||
read(RawConnection.Socket, buffer(&Code, 1), ec);
|
read(RawConnection.Socket, buffer(&Code, 1), ec);
|
||||||
if (ec) {
|
if (ec) {
|
||||||
// TODO: is this right?!
|
// TODO: is this right?!
|
||||||
RawConnection.Socket.shutdown(socket_base::shutdown_both);
|
RawConnection.Socket.shutdown(socket_base::shutdown_both, ec);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
std::shared_ptr<TClient> Client { nullptr };
|
std::shared_ptr<TClient> Client { nullptr };
|
||||||
|
|||||||
Reference in New Issue
Block a user