Skip to content

Commit a0c0411

Browse files
committed
d_nbActiveChannels
Signed-off-by: Emelia Lei <[email protected]>
1 parent 50d4bf6 commit a0c0411

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/groups/mqb/mqbnet/mqbnet_tcpsessionfactory.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -643,8 +643,6 @@ void TCPSessionFactory::initialConnectionComplete(
643643
inserted = d_channels.insert(toInsert);
644644
info = inserted.first->second;
645645

646-
++d_nbActiveChannels;
647-
648646
if (info->d_monitor.isHearbeatEnabled() &&
649647
d_heartbeatSchedulerActive) {
650648
// Enable/Disable heartbeating under the lock
@@ -776,6 +774,9 @@ void TCPSessionFactory::channelStateCallback(
776774
bmqsys::Time::highResolutionTimer();
777775
} // close mutex lock guard // UNLOCK
778776

777+
// Keep track of active channels, for logging purposes
778+
++d_nbActiveChannels;
779+
779780
handleInitialConnection(channel, context);
780781
}
781782
} break;
@@ -832,8 +833,6 @@ void TCPSessionFactory::onClose(const InitialConnectionContext* context_p,
832833
channelInfo = it->second;
833834
d_channels.erase(it);
834835

835-
--d_nbActiveChannels;
836-
837836
// Synchronously remove from heartbeat monitored channels
838837
if (channelInfo->d_monitor.isHearbeatEnabled() &&
839838
d_heartbeatSchedulerActive) {

0 commit comments

Comments
 (0)