From 18fd377f86b47234d1598524092167a5930b3e3b Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Sat, 6 Aug 2011 23:39:00 +0300 Subject: [PATCH] Don't consider calling poll_connect without a connection attempt an error --- source/streamsocket.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/streamsocket.cpp b/source/streamsocket.cpp index 9147ad8..ed506d6 100644 --- a/source/streamsocket.cpp +++ b/source/streamsocket.cpp @@ -82,7 +82,7 @@ bool StreamSocket::connect(const SockAddr &addr) bool StreamSocket::poll_connect(const Time::TimeDelta &timeout) { if(!connecting) - throw bad_socket_state("not connecting"); + return false; IO::PollEvent res = poll(*this, IO::P_OUTPUT, timeout); if(res&IO::P_OUTPUT) -- 2.45.2