You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2014/01/03 18:18:52 UTC

[21/50] git commit: TS-2248 Segmentation fault HttpTunnel and throttling

TS-2248 Segmentation fault HttpTunnel and throttling

Reviews: amc and zwoop


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

Branch: refs/heads/5.0.x
Commit: 40a49e312afe6846869fa3ce2808aaf4f6eb078f
Parents: b36a7e1
Author: bettydramit <b1...@gmail.com>
Authored: Sat Dec 28 13:53:46 2013 -0700
Committer: Leif Hedstrom <le...@ogre.com>
Committed: Sat Dec 28 13:53:46 2013 -0700

----------------------------------------------------------------------
 proxy/http/HttpTunnel.cc | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/40a49e31/proxy/http/HttpTunnel.cc
----------------------------------------------------------------------
diff --git a/proxy/http/HttpTunnel.cc b/proxy/http/HttpTunnel.cc
index 4ba3b33..ca2f60c 100644
--- a/proxy/http/HttpTunnel.cc
+++ b/proxy/http/HttpTunnel.cc
@@ -1190,15 +1190,14 @@ HttpTunnel::consumer_reenable(HttpTunnelConsumer* c)
     // greater) to the target, we use strict comparison only for
     // checking low water, otherwise the flow control can stall out.
     uint64_t backlog = (flow_state.enabled_p && p->is_source())
-      ? p->backlog(flow_state.high_water)
-      : 0;
+      ? p->backlog(flow_state.high_water) : 0;
 
     if (backlog >= flow_state.high_water) {
       if (is_debug_tag_set("http_tunnel"))
         Debug("http_tunnel", "Throttle   %p %" PRId64 " / %" PRId64, p, backlog, p->backlog());
       p->throttle(); // p becomes srcp for future calls to this method
     } else {
-      if (srcp && c->is_sink()) {
+      if (srcp && srcp->alive && c->is_sink()) {
         // Check if backlog is below low water - note we need to check
         // against the source producer, not necessarily the producer
         // for this consumer. We don't have to recompute the backlog