If an initiator tries to connect to a port that isn't accepting connections there is no "connection refused" error.
The first time you get an error is after processReadSet runs, which calls SocketConnection::readFromSocket, which calls recv, which returns zero, causing an SocketRecvFailure exception which prints the message "Connection reset by peer"
That message is very misleading, because it corresponds to the description of a real socket error, ECONNRESET, which is completely unrelated to the "connection refused" case.
Is there a good reason why the return value of socket_connect() is not checked in SocketConnector::connect() ?
Checking that return value would allow the error to be reported sooner, and the actual error condition (which will usually be ECONNREFUSED) could be reported.
I think this is a duplicate of bug 2915089.
http://sourceforge.net/tracker/?func=detail&aid=2915089&group_id=37535&atid=1126912
ah yes, it's a dup, sorry
Fixed