fix crash when the client disconnects while sending first identify setting

This commit is contained in:
Lion Kortlepel 2022-10-06 19:02:04 +02:00
parent 98f77e157f
commit 94c0547a35
No known key found for this signature in database
GPG Key ID: 4322FF2B4C71259B

View File

@ -173,7 +173,7 @@ void TNetwork::Identify(TConnection&& RawConnection) {
read(RawConnection.Socket, buffer(&Code, 1), ec);
if (ec) {
// TODO: is this right?!
RawConnection.Socket.shutdown(socket_base::shutdown_both);
RawConnection.Socket.shutdown(socket_base::shutdown_both, ec);
return;
}
std::shared_ptr<TClient> Client { nullptr };