diff --git a/src/hd-rum-translator/hd-rum-translator.cpp b/src/hd-rum-translator/hd-rum-translator.cpp index 981185e4d..ef189339c 100644 --- a/src/hd-rum-translator/hd-rum-translator.cpp +++ b/src/hd-rum-translator/hd-rum-translator.cpp @@ -932,8 +932,6 @@ int main(int argc, char **argv) } const double participant_timeout = 10.0; if(tv_diff(t, it->last_recv) > participant_timeout){ - std::swap(*it, participants.back()); - participants.pop_back(); log_msg(LOG_LEVEL_NOTICE, "Removing participant\n"); std::string msg = "delete-port "; auto addr = reinterpret_cast(&it->addr); @@ -941,6 +939,9 @@ int main(int argc, char **argv) get_sockaddr_addr_str(addr, addr_str, sizeof(addr_str)); msg += get_replica_mod_name(addr_str, get_sockaddr_addr_port(addr)); + std::swap(*it, participants.back()); + participants.pop_back(); + struct msg_universal *m = (struct msg_universal *) new_message(sizeof(struct msg_universal)); strncpy(m->text, msg.c_str(), sizeof(m->text) - 1); log_msg(LOG_LEVEL_NOTICE, "Msg: %s\n", m->text);