mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-13 06:16:10 -04:00
make evhttp_send() safe against terminated connections, too
This commit is contained in:
parent
5c8b446eba
commit
01ea0c5c28
5
http.c
5
http.c
@ -1935,6 +1935,11 @@ evhttp_send(struct evhttp_request *req, struct evbuffer *databuf)
|
|||||||
{
|
{
|
||||||
struct evhttp_connection *evcon = req->evcon;
|
struct evhttp_connection *evcon = req->evcon;
|
||||||
|
|
||||||
|
if (evcon == NULL) {
|
||||||
|
evhttp_request_free(req);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
assert(TAILQ_FIRST(&evcon->requests) == req);
|
assert(TAILQ_FIRST(&evcon->requests) == req);
|
||||||
|
|
||||||
/* we expect no more calls form the user on this request */
|
/* we expect no more calls form the user on this request */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user