bufferevent_ssl: check return value of the evbuffer_drain()

Refs: #1163
This commit is contained in:
Azat Khuzhin 2021-09-19 00:39:30 +03:00
parent b926af2625
commit 41b5ab0f49

View File

@ -385,7 +385,9 @@ do_write(struct bufferevent_ssl *bev_ssl, int atmost)
}
}
if (n_written) {
evbuffer_drain(output, n_written);
if (evbuffer_drain(output, n_written))
return OP_ERR | result;
if (bev_ssl->underlying)
BEV_RESET_GENERIC_WRITE_TIMEOUT(bev);