From a51940fac07fdf096405e5f9ea2a5611aef17689 Mon Sep 17 00:00:00 2001 From: SomberNight Date: Tue, 10 Jul 2018 18:07:52 +0200 Subject: [PATCH] fix #4529 --- lib/network.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/network.py b/lib/network.py index fe6c68475..56ed01eb9 100644 --- a/lib/network.py +++ b/lib/network.py @@ -529,9 +529,10 @@ class Network(util.DaemonThread): self.auto_connect = auto_connect if self.proxy != proxy or self.protocol != protocol: # Restart the network defaulting to the given server - self.stop_network() - self.default_server = server - self.start_network(protocol, proxy) + with self.interface_lock: + self.stop_network() + self.default_server = server + self.start_network(protocol, proxy) elif self.default_server != server: self.switch_to_interface(server) else: