Updated Branches: refs/heads/master 457b231b6 -> 366fab2ae
TS-1796 remove cluster connection number change handle Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/366fab2a Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/366fab2a Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/366fab2a Branch: refs/heads/master Commit: 366fab2ae35510fee9d2182edc7be4ea44c3ebab Parents: 457b231 Author: Chen Bin <[email protected]> Authored: Tue Apr 2 11:22:04 2013 +0800 Committer: Chen Bin <[email protected]> Committed: Tue Apr 2 11:22:04 2013 +0800 ---------------------------------------------------------------------- iocore/cluster/ClusterHandlerBase.cc | 21 +++------------------ 1 files changed, 3 insertions(+), 18 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/366fab2a/iocore/cluster/ClusterHandlerBase.cc ---------------------------------------------------------------------- diff --git a/iocore/cluster/ClusterHandlerBase.cc b/iocore/cluster/ClusterHandlerBase.cc index a8ee01c..ee8070c 100644 --- a/iocore/cluster/ClusterHandlerBase.cc +++ b/iocore/cluster/ClusterHandlerBase.cc @@ -1038,28 +1038,13 @@ ClusterHandler::startClusterEvent(int event, Event * e) CLUSTER_INCREMENT_DYN_STAT(CLUSTER_NODES_STAT); this_cluster()->configurations.push(cconf); } else { - if (m->num_connections > machine->num_connections) { - // close old needlessness connection if new num_connections < old num_connections - for (int i = machine->num_connections; i < m->num_connections; i++) { - if (m->clusterHandlers[i]) - m->clusterHandlers[i]->downing = true; - } - m->free_connections -= (m->num_connections - machine->num_connections); - m->num_connections = machine->num_connections; - // delete_this + // close new connection if old connections is exist + if (id >= m->num_connections || m->clusterHandlers[id]) { failed = -2; MUTEX_UNTAKE_LOCK(the_cluster_config_mutex, this_ethread()); goto failed; - } else { - m->num_connections = machine->num_connections; - // close new connection if old connections is exist - if (id >= m->num_connections || m->clusterHandlers[id]) { - failed = -2; - MUTEX_UNTAKE_LOCK(the_cluster_config_mutex, this_ethread()); - goto failed; - } - machine = m; } + machine = m; } machine->now_connections++; machine->clusterHandlers[id] = this;
