|
|
@ -337,7 +337,7 @@ int Connection::AfterResolve(eio_req *req) { |
|
|
|
if (address_list) freeaddrinfo(address_list); |
|
|
|
|
|
|
|
// no error. return.
|
|
|
|
if (req->result == 0) { |
|
|
|
if (req->result == 0 && !r) { |
|
|
|
evcom_stream_attach(EV_DEFAULT_UC_ &connection->stream_); |
|
|
|
goto out; |
|
|
|
} |
|
|
@ -348,7 +348,13 @@ int Connection::AfterResolve(eio_req *req) { |
|
|
|
* The fact that I'm modifying a read-only variable here should be |
|
|
|
* good evidence of this. |
|
|
|
*/ |
|
|
|
connection->stream_.errorno = req->result; |
|
|
|
|
|
|
|
if (req->result) { |
|
|
|
connection->stream_.errorno = req->result; |
|
|
|
} else { |
|
|
|
assert(r); |
|
|
|
assert(connection->stream_.errorno); |
|
|
|
} |
|
|
|
|
|
|
|
connection->OnClose(); |
|
|
|
|
|
|
|