trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zw...@apache.org
Subject [1/2] git commit: TS-1320 Reading from SSL origin can starve sending data to client
Date Tue, 26 Feb 2013 00:00:35 GMT
TS-1320 Reading from SSL origin can starve sending data to client


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/a7dec953
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/a7dec953
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/a7dec953

Branch: refs/heads/master
Commit: a7dec953238d644c43b08c75a06f5b7bbc4b1019
Parents: 93e14b2
Author: William Bardwell <wbardwell@apache.org>
Authored: Mon Feb 25 16:57:15 2013 -0700
Committer: Leif Hedstrom <zwoop@apache.org>
Committed: Mon Feb 25 16:57:46 2013 -0700

----------------------------------------------------------------------
 iocore/net/SSLNetVConnection.cc |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a7dec953/iocore/net/SSLNetVConnection.cc
----------------------------------------------------------------------
diff --git a/iocore/net/SSLNetVConnection.cc b/iocore/net/SSLNetVConnection.cc
index 1af06d4..ee57ad9 100644
--- a/iocore/net/SSLNetVConnection.cc
+++ b/iocore/net/SSLNetVConnection.cc
@@ -258,11 +258,11 @@ SSLNetVConnection::net_read_io(NetHandler *nh, EThread *lthread)
     if (ret == SSL_READ_READY || ret == SSL_READ_ERROR_NONE) {
       bytes += r;
     }
-
-  } while (ret == SSL_READ_READY || ret == SSL_READ_ERROR_NONE);
+    ink_debug_assert(bytes >= 0);
+  } while ((ret == SSL_READ_READY && bytes == 0) || ret == SSL_READ_ERROR_NONE);
 
   if (bytes > 0) {
-    if (ret == SSL_READ_WOULD_BLOCK) {
+    if (ret == SSL_READ_WOULD_BLOCK || ret == SSL_READ_READY) {
       if (readSignalAndUpdate(VC_EVENT_READ_READY) != EVENT_CONT) {
         Debug("ssl", "ssl_read_from_net, readSignal != EVENT_CONT");
         return;
@@ -273,8 +273,8 @@ SSLNetVConnection::net_read_io(NetHandler *nh, EThread *lthread)
   switch (ret) {
   case SSL_READ_ERROR_NONE:
   case SSL_READ_READY:
-    // how did we exit the while loop above? should never happen.
-    ink_debug_assert(false);
+    readReschedule(nh);
+    return;
     break;
   case SSL_WRITE_WOULD_BLOCK:
   case SSL_READ_WOULD_BLOCK:


Mime
View raw message