@@ -803,12 +803,12 @@ void DiscoveryDataBase::update_participant_from_change_(
803803 update_change_and_unmatch_ (ch, participant_info);
804804
805805 // If it is local and server we have to create virtual endpoints, except for our own server
806- if (change_guid.guidPrefix != server_guid_prefix_ && change_data.is_local ())
806+ if (change_guid.guidPrefix != server_guid_prefix_ && !change_data. is_client () && change_data.is_local ())
807807 {
808808 // Match new server and create virtual endpoints
809809 // NOTE: match after having updated the change, so virtual endpoints are not discarded for having
810810 // an associated unalive participant
811- match_new_server_ (change_guid.guidPrefix , change_data.is_client () || change_data. is_superclient ());
811+ match_new_server_ (change_guid.guidPrefix , change_data.is_superclient ());
812812 }
813813
814814 // Treat as a new participant found
@@ -832,8 +832,13 @@ void DiscoveryDataBase::update_participant_from_change_(
832832 // Update change
833833 update_change_and_unmatch_ (ch, participant_info);
834834
835- // NOTE: match after having updated the change in order to send the new Data(P)
836- match_new_server_ (change_guid.guidPrefix , change_data.is_client () || change_data.is_superclient ());
835+ // If the participant changes to server local, virtual endpoints must be added
836+ // If it is local and server the only possibility is it was a remote server and it must be converted to local
837+ if (!change_data.is_client ())
838+ {
839+ // NOTE: match after having updated the change in order to send the new Data(P)
840+ match_new_server_ (change_guid.guidPrefix , change_data.is_superclient ());
841+ }
837842
838843 // Treat as a new participant found
839844 new_updates_++;
0 commit comments