From b79bfaae548be11c128b94dea63ef02705001942 Mon Sep 17 00:00:00 2001 From: Francesco Chemolli Date: Mon, 2 Jul 2012 17:30:02 +0200 Subject: [PATCH] Small optimization in CommOpener statistic accounting. --- src/comm/ConnOpener.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/comm/ConnOpener.cc b/src/comm/ConnOpener.cc index f8d464fbe8..556742e7ca 100644 --- a/src/comm/ConnOpener.cc +++ b/src/comm/ConnOpener.cc @@ -202,8 +202,8 @@ Comm::ConnOpener::connected() * based on the max-conn option. We need to increment here, * even if the connection may fail. */ - if (conn_->getPeer()) - conn_->getPeer()->stats.conn_open++; + if (peer *peer=(conn_->getPeer())) + ++peer->stats.conn_open; lookupLocalAddress(); -- 2.47.3