mirror of
https://github.com/libevent/libevent.git
synced 2025-01-09 00:56:20 +08:00
fix handling of close_notify (ssl) in http with openssl bufferevents
Since it can arrive after we disabled events in that bufferevent and reseted fd, hence evhttp_error_cb() could be called after SSL_RECEIVED_SHUTDOWN. Closes: #557
This commit is contained in:
parent
8b0aa7b36a
commit
da3f2ba22a
2
http.c
2
http.c
@ -1309,6 +1309,8 @@ evhttp_connection_reset_(struct evhttp_connection *evcon)
|
||||
struct evbuffer *tmp;
|
||||
int err;
|
||||
|
||||
bufferevent_setcb(evcon->bufev, NULL, NULL, NULL, NULL);
|
||||
|
||||
/* XXXX This is not actually an optimal fix. Instead we ought to have
|
||||
an API for "stop connecting", or use bufferevent_setfd to turn off
|
||||
connecting. But for Libevent 2.0, this seems like a minimal change
|
||||
|
Loading…
x
Reference in New Issue
Block a user