fix no broadcast after disconnect (#491)

fix no broadcast after disconnect After a disconnect the trackers did not send a broadcast to discover the server but did directly try to send it to the server. So if for some reason the server did change its ip address the tracker had to be rebooted.
This commit is contained in:
unlogisch04
2025-11-27 19:29:01 +01:00
committed by GitHub
parent afd376c427
commit cc42ad0aa9

View File

@@ -620,6 +620,9 @@ void Connection::reset() {
m_UDP.begin(m_ServerPort);
// Reset server address to broadcast if disconnected
m_ServerHost = IPAddress(255, 255, 255, 255);
statusManager.setStatus(SlimeVR::Status::SERVER_CONNECTING, true);
}
@@ -650,6 +653,9 @@ void Connection::update() {
);
m_Logger.warn("Connection to server timed out");
// Reset server address to broadcast if disconnected
m_ServerHost = IPAddress(255, 255, 255, 255);
return;
}