-
Type: Improvement
-
Status: Open
-
Priority: Minor
-
Resolution: Unresolved
-
Affects Version/s: 2.2.227
-
Fix Version/s: Not yet scheduled version
-
Component/s: Proxy
-
Tags:
- When a user is connected to a network (ex: office network) using a laptop the nuxeo-drive is using the current network's proxy settings (thru system settings).
- When the user leaves the current network and joins another network (home network) the nuxeo-drive stops working as it is still using the previous network proxy settings.
- This is because the proxy settings are modified for the system but not in the nuxeo-drive settings.
Expected: nuxeo-drive should retrieve latest proxy settings from system and use it. I think if we do it when connection failure / network connectivity failure happens then nuxeo-drive can recover quickly after a network migration.
If we clear the remote document client, remote client caches in the engine whenever engine goes offline, then proxy server will be re-computed from system settings. This will enable nuxeo-drive to automatically recover faster. Example code change (egine.set_offline method):
diff --git a/nuxeo-drive-client/nxdrive/engine/engine.py b/nuxeo-drive-client/nxdrive/engine/engine.py index 618e9bb..574c9a3 100644 --- a/nuxeo-drive-client/nxdrive/engine/engine.py +++ b/nuxeo-drive-client/nxdrive/engine/engine.py @@ -262,6 +262,11 @@ class Engine(QObject): if value: log.debug("Engine %s goes offline", self._uid) self._queue_manager.suspend() + proxy_settings = self._manager.get_proxy_settings() + if proxy_settings.config == 'System': + # Modification of system proxy settings, or changing network can cause engine to go offline. + # So clear the client cache, to facilitate re-compute of proxy servers again. + self.invalidate_client_cache() self.offline.emit() else: log.debug("Engine %s goes online", self._uid)