From a142739e61f47659b51e92e18155c78867b96096 Mon Sep 17 00:00:00 2001 From: shinrich Date: Wed, 2 Mar 2016 09:08:59 -0600 Subject: [PATCH] TS-4187: Fix connections_currently_open stat. --- iocore/net/UnixNetVConnection.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/iocore/net/UnixNetVConnection.cc b/iocore/net/UnixNetVConnection.cc index 56f38b9248c..e235bc76f5d 100644 --- a/iocore/net/UnixNetVConnection.cc +++ b/iocore/net/UnixNetVConnection.cc @@ -1393,6 +1393,10 @@ UnixNetVConnection::migrateToCurrentThread(Continuation *cont, EThread *t) this->ep.stop(); this->do_io_close(); + // The do_io_close will decrement the current stat count but we are creating a new vc. + // Increment the currently open stat here so the net current count is unchanged + NET_SUM_GLOBAL_DYN_STAT(net_connections_currently_open_stat, 1); + // Create new VC: if (save_ssl) { SSLNetVConnection *sslvc = static_cast(sslNetProcessor.allocate_vc(t));