From aad0ac25d19a8cff8dbcae31857d38529e21a7c9 Mon Sep 17 00:00:00 2001 From: Nick Bolton Date: Wed, 8 Aug 2018 15:13:22 +0100 Subject: [PATCH] #6338 Only add server IPs when in client mode, and clear the IP list each time zeroconf restarts --- src/gui/src/MainWindow.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/gui/src/MainWindow.cpp b/src/gui/src/MainWindow.cpp index ce47b315..1dcbd632 100644 --- a/src/gui/src/MainWindow.cpp +++ b/src/gui/src/MainWindow.cpp @@ -1071,6 +1071,11 @@ void MainWindow::changeEvent(QEvent* event) void MainWindow::zeroconfServerDetected(const QString name) { + // don't add to the server combo box if not in client mode. + if (synergyType() != synergyClient) { + return; + } + // don't add yourself to the server list. if (getIPAddresses().contains(name)) { return; @@ -1221,6 +1226,11 @@ void MainWindow::on_m_pActionAbout_triggered() void MainWindow::updateZeroconfService() { #ifndef SYNERGY_ENTERPRISE + + // reset the server list in case one has gone away. + // it'll be re-added after the zeroconf service restarts. + m_pComboServerList->clear(); + if (m_pZeroconf != nullptr) { if (appConfig().autoConfig()) { m_pZeroconf->startService();