Repository: trafficserver
Updated Branches:
  refs/heads/6.1.x f5a200c05 -> 883749e47


fix NetHandler::manage_keep_alive_queue and NetHandler::manage_active_queue bug

In the NetHandler::manage_active_queue() function:
vc_next is not assigned.

In the NetHandler::manage_keep_alive_queue() function:
vc_next is assigned wrong value. It should be vc->keep_alive_queue_link.next.

This closes #421

(cherry picked from commit fd08c6efc4896edb06a2b2ac54f636b7260f3d1f)


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

Branch: refs/heads/6.1.x
Commit: 883749e47e4f534a130151d2c738dfdae6d53e94
Parents: f5a200c
Author: zuobeixing <[email protected]>
Authored: Thu Jan 14 11:10:27 2016 +0800
Committer: Leif Hedstrom <[email protected]>
Committed: Thu Jan 14 18:33:05 2016 -0700

----------------------------------------------------------------------
 iocore/net/UnixNet.cc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/883749e4/iocore/net/UnixNet.cc
----------------------------------------------------------------------
diff --git a/iocore/net/UnixNet.cc b/iocore/net/UnixNet.cc
index a96f5f5..7eb252a 100644
--- a/iocore/net/UnixNet.cc
+++ b/iocore/net/UnixNet.cc
@@ -591,6 +591,7 @@ NetHandler::manage_active_queue()
   int total_idle_time = 0;
   int total_idle_count = 0;
   for (; vc != NULL; vc = vc_next) {
+    vc_next = vc->active_queue_link.next;
     if ((vc->next_inactivity_timeout_at <= now) || 
(vc->next_activity_timeout_at <= now)) {
       _close_vc(vc, now, handle_event, closed, total_idle_time, 
total_idle_count);
     }
@@ -635,7 +636,7 @@ NetHandler::manage_keep_alive_queue()
   int total_idle_time = 0;
   int total_idle_count = 0;
   for (UnixNetVConnection *vc = keep_alive_queue.head; vc != NULL; vc = 
vc_next) {
-    vc_next = vc->active_queue_link.next;
+    vc_next = vc->keep_alive_queue_link.next;
     _close_vc(vc, now, handle_event, closed, total_idle_time, 
total_idle_count);
 
     total_connections_in = active_queue_size + keep_alive_queue_size;

Reply via email to