abort set_parameters if changes are not allowed by config

This commit is contained in:
ThomasV 2015-03-01 07:27:05 +01:00
parent 7a9141e509
commit e9b06f494d
1 changed files with 3 additions and 0 deletions

View File

@ -243,6 +243,9 @@ class Network(threading.Thread):
self.config.set_key('auto_cycle', auto_connect, True)
self.config.set_key("proxy", proxy_str, True)
self.config.set_key("server", server_str, True)
# abort if changes were not allowed by config
if self.config.get('server') != server_str or self.config.get('proxy') != proxy:
return
if self.proxy != proxy or self.protocol != protocol:
print_error('restarting network')