Tue, 16 Dec 2014 01:46:22 +0200
- I think closing sockets is a good idea
sources/network/udpsocket.cpp | file | annotate | diff | comparison | revisions |
--- a/sources/network/udpsocket.cpp Tue Dec 16 00:55:03 2014 +0200 +++ b/sources/network/udpsocket.cpp Tue Dec 16 01:46:22 2014 +0200 @@ -34,6 +34,7 @@ #include <netinet/in.h> #include <string.h> #include <fcntl.h> +#include <unistd.h> #include "udpsocket.h" #include "../huffman/huffman.h" @@ -46,7 +47,10 @@ // ----------------------------------------------------------------------------- // -UDPSocket::~UDPSocket() {} +UDPSocket::~UDPSocket() +{ + close (m_socket); +} // ------------------------------------------------------------------------------------------------- //