From a403653805c6fd6022868c5f381e10107e1d2b20 Mon Sep 17 00:00:00 2001 From: Patric Stout Date: Thu, 13 May 2021 11:46:51 +0200 Subject: Codechange: [Network] split CloseSocket and CloseConnection more clearly (#9261) * Codechange: [Network] split CloseSocket and CloseConnection more clearly - CloseSocket now closes the actual OS socket. - CloseConnection frees up the resources to just before CloseSocket. - dtors call CloseSocket / CloseConnection where needed. --- src/network/core/packet.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/network/core/packet.cpp') diff --git a/src/network/core/packet.cpp b/src/network/core/packet.cpp index 736970791..883097dea 100644 --- a/src/network/core/packet.cpp +++ b/src/network/core/packet.cpp @@ -222,7 +222,7 @@ bool Packet::CanReadFromPacket(size_t bytes_to_read, bool close_connection) /* Check if variable is within packet-size */ if (this->pos + bytes_to_read > this->Size()) { - if (close_connection) this->cs->NetworkSocketHandler::CloseConnection(); + if (close_connection) this->cs->NetworkSocketHandler::MarkClosed(); return false; } -- cgit v1.2.3-70-g09d2