Shutdown/startup TCP server with leader status

This commit is contained in:
2025-10-23 23:07:08 -04:00
parent a667d8d9f7
commit f769ce3ca0
5 changed files with 36 additions and 5 deletions

View File

@@ -84,8 +84,12 @@ void CommunicationRouter::update_leader() {
if (this->m_leader != max) {
if (max == m_module_id) {
m_pc_connection->connect();
m_lossless_server->startup();
// todo: BTS-22 add lossy server
} else if (this->m_leader == m_module_id) {
m_pc_connection->disconnect();
m_lossless_server->shutdown();
// todo: BTS-22 add lossy server
}
}