Skip to content

Commit 8d7225d

Browse files
committed
Connect: better document suppressing recursive loop
1 parent 5310f90 commit 8d7225d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

core/src/stage.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -740,10 +740,12 @@ ConnectingPrivate::StatePair ConnectingPrivate::make_pair<Interface::FORWARD>(In
740740
template <Interface::Direction dir>
741741
void ConnectingPrivate::newState(Interface::iterator it, Interface::UpdateFlags updated) {
742742
auto parent_pimpl = parent()->pimpl();
743+
// disable current interface to break loop (jumping back and forth between both interfaces)
744+
// this will be checked by notifyEnabled() below
743745
Interface::DisableNotify disable_source_interface(*pullInterface<dir>());
744746
if (updated) {
745747
if (updated.testFlag(Interface::STATUS) && // only perform these costly operations if needed
746-
pullInterface<opposite<dir>()>()->notifyEnabled()) // suppress recursive loop
748+
pullInterface<opposite<dir>()>()->notifyEnabled()) // suppressing recursive loop?
747749
{
748750
// If status has changed, propagate the update to the opposite side
749751
auto status = it->priority().status();

0 commit comments

Comments
 (0)