Permalink
Browse files

No need to reserve space if reading is suspended.

  • Loading branch information...
1 parent 4a1599c commit b469b5ee2ac3f38dca314112d040bb8d40ff78ed @fancycode committed Sep 6, 2012
Showing with 3 additions and 0 deletions.
  1. +3 −0 bufferevent_openssl.c
View
@@ -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;

0 comments on commit b469b5e

Please sign in to comment.