]> granicus.if.org Git - apache/commitdiff
no more blocking reads for aborted sessions
authorStefan Eissing <icing@apache.org>
Tue, 5 Jan 2016 15:39:56 +0000 (15:39 +0000)
committerStefan Eissing <icing@apache.org>
Tue, 5 Jan 2016 15:39:56 +0000 (15:39 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1723102 13f79535-47bb-0310-9956-ffa450edef68

modules/http2/h2_session.c

index f0eb500aebf8e11617b1eea7c1c3f1d912d9cb73..4b483addea8a6430d32cda13c48c2575a78837d9 100644 (file)
@@ -1628,7 +1628,7 @@ static apr_status_t h2_session_read(h2_session *session, int block, int loops)
          * We just pull at the filter chain to make it happen */
         status = ap_get_brigade(c->input_filters,
                                 session->bbtmp, AP_MODE_READBYTES,
-                                block? APR_BLOCK_READ : APR_NONBLOCK_READ,
+                                (block && !session->aborted)? APR_BLOCK_READ : APR_NONBLOCK_READ,
                                 APR_BUCKET_BUFF_SIZE);
         /* get rid of any possible data we do not expect to get */
         apr_brigade_cleanup(session->bbtmp); 
@@ -1672,6 +1672,10 @@ static apr_status_t h2_session_read(h2_session *session, int block, int loops)
                  * status. */
                 return rstatus;
         }
+        
+        if (session->aborted) {
+            break;
+        }
     }
     return rstatus;
 }