Repository: trafficserver Updated Branches: refs/heads/master b4eda9565 -> fd08c6efc
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 Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/fd08c6ef Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/fd08c6ef Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/fd08c6ef Branch: refs/heads/master Commit: fd08c6efc4896edb06a2b2ac54f636b7260f3d1f Parents: b4eda95 Author: zuobeixing <[email protected]> Authored: Thu Jan 14 11:10:27 2016 +0800 Committer: Leif Hedstrom <[email protected]> Committed: Thu Jan 14 17:29:50 2016 -0800 ---------------------------------------------------------------------- iocore/net/UnixNet.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/fd08c6ef/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;
