warn on connection failures

svn:r853
This commit is contained in:
Niels Provos 2008-06-17 01:14:58 +00:00
parent 2baaac7fdb
commit 774d056c46

2
http.c
View File

@ -1574,6 +1574,8 @@ evhttp_connection_connect(struct evhttp_connection *evcon)
}
if (socket_connect(evcon->fd, evcon->address, evcon->port) == -1) {
event_warn("%s: connection to \"%s\" failed",
__func__, evcon->address);
EVUTIL_CLOSESOCKET(evcon->fd); evcon->fd = -1;
return (-1);
}