mirror of
https://github.com/libevent/libevent.git
synced 2025-01-31 09:12:55 +08:00
http: fix EVHTTP_CON_AUTOFREE in case of timeout (and some else)
Refs: #182 (cherry picked from commit eee26deed38fc7a6b6780b54628b007a2810efcd)
This commit is contained in:
parent
8dc6468e7e
commit
1be25938b0
5
http.c
5
http.c
@ -782,6 +782,11 @@ evhttp_connection_fail_(struct evhttp_connection *evcon,
|
||||
/* We are trying the next request that was queued on us */
|
||||
if (TAILQ_FIRST(&evcon->requests) != NULL)
|
||||
evhttp_connection_connect_(evcon);
|
||||
else
|
||||
if ((evcon->flags & EVHTTP_CON_OUTGOING) &&
|
||||
(evcon->flags & EVHTTP_CON_AUTOFREE)) {
|
||||
evhttp_connection_free(evcon);
|
||||
}
|
||||
|
||||
/* The call to evhttp_connection_reset_ overwrote errno.
|
||||
* Let's restore the original errno, so that the user's
|
||||
|
Loading…
x
Reference in New Issue
Block a user