summaryrefslogtreecommitdiff
path: root/src/network/core/tcp_content.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/network/core/tcp_content.h')
-rw-r--r--src/network/core/tcp_content.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/network/core/tcp_content.h b/src/network/core/tcp_content.h
index 52cae1e0e..b1bde4817 100644
--- a/src/network/core/tcp_content.h
+++ b/src/network/core/tcp_content.h
@@ -21,7 +21,7 @@
/** Base socket handler for all Content TCP sockets */
class NetworkContentSocketHandler : public NetworkTCPSocketHandler {
protected:
- void Close() override;
+ void CloseSocket();
bool ReceiveInvalidPacket(PacketContentType type);
@@ -124,7 +124,11 @@ public:
}
/** On destructing of this class, the socket needs to be closed */
- virtual ~NetworkContentSocketHandler() { this->Close(); }
+ virtual ~NetworkContentSocketHandler()
+ {
+ /* Virtual functions get called statically in destructors, so make it explicit to remove any confusion. */
+ this->CloseSocket();
+ }
bool ReceivePackets();
};