From 0620c8e589c713fa0f0d0f66a4c4d203e8f3f87f Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Sat, 7 Nov 2015 23:41:06 +0100 Subject: Avoid leaking socket filedescriptors When trying the various results of getaddrinfo, we forgot to close the socket when one fails, before trying the next one. Also use the destructor to make sure we do not have some other unrelated leak. --- louloulibs/network/tcp_socket_handler.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'louloulibs/network/tcp_socket_handler.hpp') diff --git a/louloulibs/network/tcp_socket_handler.hpp b/louloulibs/network/tcp_socket_handler.hpp index 213e286..d33b919 100644 --- a/louloulibs/network/tcp_socket_handler.hpp +++ b/louloulibs/network/tcp_socket_handler.hpp @@ -27,7 +27,7 @@ class TCPSocketHandler: public SocketHandler { protected: - ~TCPSocketHandler() = default; + ~TCPSocketHandler(); public: explicit TCPSocketHandler(std::shared_ptr poller); -- cgit v1.2.3