X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fnet%2Fclientsocket.cpp;h=fbbd2415c693911b88063f0091600d0d3e73f25a;hb=593c8202bf8c6ecc563aaacf0811aef953b45f09;hp=c400f80e9848946a4c6bff0d8b980c86b156ad3a;hpb=6625cf0e574406425c35d33110f8d99617e902df;p=libs%2Fnet.git diff --git a/source/net/clientsocket.cpp b/source/net/clientsocket.cpp index c400f80..fbbd241 100644 --- a/source/net/clientsocket.cpp +++ b/source/net/clientsocket.cpp @@ -1,6 +1,6 @@ #include "platform_api.h" -#include #include "clientsocket.h" +#include #include "socket_private.h" namespace Msp { @@ -19,8 +19,6 @@ ClientSocket::ClientSocket(const Private &p, const SockAddr &paddr): ClientSocket::~ClientSocket() { signal_flush_required.emit(); - - delete peer_addr; } void ClientSocket::shutdown(IO::Mode m) @@ -51,7 +49,7 @@ void ClientSocket::shutdown(IO::Mode m) const SockAddr &ClientSocket::get_peer_address() const { - if(peer_addr==0) + if(!peer_addr) throw bad_socket_state("not connected"); return *peer_addr; }