mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-12 05:48:51 -04:00
Merge remote-tracking branch 'origin/patches-2.0'
Conflicts: bufferevent_openssl.c
This commit is contained in:
commit
f2050e79d5
@ -574,6 +574,9 @@ do_read(struct bufferevent_openssl *bev_ssl, int n_to_read) {
|
||||
struct evbuffer_iovec space[2];
|
||||
int result = 0;
|
||||
|
||||
if (bev_ssl->bev.read_suspended)
|
||||
return 0;
|
||||
|
||||
atmost = bufferevent_get_read_max_(&bev_ssl->bev);
|
||||
if (n_to_read > atmost)
|
||||
n_to_read = atmost;
|
||||
@ -786,6 +789,9 @@ consider_reading(struct bufferevent_openssl *bev_ssl)
|
||||
if (r & (OP_BLOCKED|OP_ERR))
|
||||
break;
|
||||
|
||||
if (bev_ssl->bev.read_suspended)
|
||||
break;
|
||||
|
||||
/* Read all pending data. This won't hit the network
|
||||
* again, and will (most importantly) put us in a state
|
||||
* where we don't need to read anything else until the
|
||||
|
Loading…
x
Reference in New Issue
Block a user