From 421d50e3bac21b5e37faf69c6c8a72a5448bed6f Mon Sep 17 00:00:00 2001 From: Michael Davidsaver Date: Wed, 3 Oct 2018 10:54:26 -0700 Subject: [PATCH] SharedPV too many notifiedConn notifiedConn set more often than it should. --- src/server/sharedstate_channel.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/server/sharedstate_channel.cpp b/src/server/sharedstate_channel.cpp index 76b6c64..4859ca7 100644 --- a/src/server/sharedstate_channel.cpp +++ b/src/server/sharedstate_channel.cpp @@ -48,10 +48,11 @@ SharedChannel::SharedChannel(const std::tr1::shared_ptr &owner, SharedPV::Handler::shared_pointer handler; { Guard G(owner->mutex); - if(owner->channels.empty()) + if(owner->channels.empty()) { handler = owner->handler; + owner->notifiedConn = true; + } owner->channels.push_back(this); - owner->notifiedConn = true; } if(handler) { handler->onFirstConnect(owner);