diff options
author | Nick Mathewson <nickm@torproject.org> | 2011-11-17 17:42:45 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2011-11-17 17:42:45 -0500 |
commit | ebf82199dfc91c437b304649829fb0a259726d5c (patch) | |
tree | 77f5eab8cbbf9f81eb6256f0b573006a6753d512 /bufferevent_openssl.c | |
parent | 2aa036fa0403977fa51812e711a1d5040c9fb5c9 (diff) | |
download | libevent-ebf82199dfc91c437b304649829fb0a259726d5c.tar.gz |
add comment to new consider_reading code
Diffstat (limited to 'bufferevent_openssl.c')
-rw-r--r-- | bufferevent_openssl.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/bufferevent_openssl.c b/bufferevent_openssl.c index 53a4d686..d703279c 100644 --- a/bufferevent_openssl.c +++ b/bufferevent_openssl.c @@ -772,6 +772,14 @@ consider_reading(struct bufferevent_openssl *bev_ssl) if (do_read(bev_ssl, n_to_read) <= 0) 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 + * socket is readable again. It'll potentially make us + * overrun our read high-watermark (somewhat + * regrettable). The damage to the rate-limit has + * already been done, since OpenSSL went and read a + * whole SSL record anyway. */ n_to_read = SSL_pending(bev_ssl->ssl); } |