Make sure srvdst.bev is not NULL in autossl

pull/48/head
Soner Tari 2 years ago
parent fce838e43b
commit 45abd2e85c

@ -433,7 +433,10 @@ protoautossl_bev_eventcb_connected_dst(struct bufferevent *bev, pxy_conn_ctx_t *
if (!ctx->connected) {
ctx->connected = 1;
bufferevent_enable(bev, EV_READ|EV_WRITE);
bufferevent_enable(ctx->srvdst.bev, EV_READ);
// srvdst.bev is NULL in split mode
if (ctx->srvdst.bev)
bufferevent_enable(ctx->srvdst.bev, EV_READ);
protoautossl_enable_src(ctx);
}

Loading…
Cancel
Save