mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-08 11:53:00 -04:00
Only clear underlying callbacks when the user hasn't reset them.
This commit is contained in:
parent
fc7b1b005c
commit
1ac5b2303a
@ -233,8 +233,9 @@ be_filter_destruct(struct bufferevent *bev)
|
||||
}
|
||||
} else {
|
||||
if (bevf->underlying) {
|
||||
bufferevent_setcb(bevf->underlying,
|
||||
NULL, NULL, NULL, NULL);
|
||||
if (bevf->underlying->errorcb == be_filter_eventcb)
|
||||
bufferevent_setcb(bevf->underlying,
|
||||
NULL, NULL, NULL, NULL);
|
||||
bufferevent_unsuspend_read(bevf->underlying,
|
||||
BEV_SUSPEND_FILT_READ);
|
||||
}
|
||||
|
@ -1090,8 +1090,9 @@ be_openssl_destruct(struct bufferevent *bev)
|
||||
SSL_free(bev_ssl->ssl);
|
||||
} else {
|
||||
if (bev_ssl->underlying) {
|
||||
bufferevent_setcb(bev_ssl->underlying,
|
||||
NULL,NULL,NULL,NULL);
|
||||
if (bev_ssl->underlying->errorcb == be_openssl_eventcb)
|
||||
bufferevent_setcb(bev_ssl->underlying,
|
||||
NULL,NULL,NULL,NULL);
|
||||
bufferevent_unsuspend_read(bev_ssl->underlying,
|
||||
BEV_SUSPEND_FILT_READ);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user