Skip to content

Commit 3a3e43e

Browse files
dorjesinpoemelialei88
authored andcommitted
bugfix: counting early sessions
Signed-off-by: dorjesinpo <[email protected]>
1 parent 7182299 commit 3a3e43e

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/groups/mqb/mqbnet/mqbnet_tcpsessionfactory.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -564,6 +564,12 @@ void TCPSessionFactory::negotiationComplete(
564564
{
565565
bslmt::LockGuard<bslmt::Mutex> guard(&d_mutex); // LOCK
566566

567+
++d_nbSessions;
568+
569+
if (isClientOrProxy(session.get())) {
570+
++d_nbOpenClients;
571+
}
572+
567573
// check if the channel is not closed (we can be in authentication
568574
// thread)
569575

@@ -578,8 +584,6 @@ void TCPSessionFactory::negotiationComplete(
578584
return; // RETURN
579585
}
580586

581-
++d_nbSessions;
582-
583587
info.createInplace(d_allocator_p,
584588
channel,
585589
monitoredSession,
@@ -595,10 +599,6 @@ void TCPSessionFactory::negotiationComplete(
595599
inserted = d_channels.insert(toInsert);
596600
info = inserted.first->second;
597601

598-
if (isClientOrProxy(info->d_session_sp.get())) {
599-
++d_nbOpenClients;
600-
}
601-
602602
if (info->d_monitor.isHearbeatEnabled() &&
603603
d_heartbeatSchedulerActive) {
604604
// Enable/Disable heartbeating under the lock

0 commit comments

Comments
 (0)