From 339f2df1ddd741070e340ec01d6882dd1eee617c Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Thu, 6 May 2021 00:44:42 -0400 Subject: ssh: rewrite proxy management for multiprocessing usage We changed sync to use multiprocessing for parallel work. This broke the ssh proxy code as it's all based on threads. Rewrite the logic to be multiprocessing safe. Now instead of the module acting as a stateful object, callers have to instantiate a new ProxyManager class that holds all the state, an pass that down to any users. Bug: https://crbug.com/gerrit/12389 Change-Id: I4b1af116f7306b91e825d3c56fb4274c9b033562 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/305486 Tested-by: Mike Frysinger Reviewed-by: Chris Mcdonald --- project.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'project.py') diff --git a/project.py b/project.py index 37558061..2f83d796 100644 --- a/project.py +++ b/project.py @@ -2045,8 +2045,8 @@ class Project(object): name = self.remote.name remote = self.GetRemote(name) - if not remote.PreConnectFetch(): - ssh_proxy = False + if not remote.PreConnectFetch(ssh_proxy): + ssh_proxy = None if initial: if alt_dir and 'objects' == os.path.basename(alt_dir): -- cgit v1.2.3-54-g00ecf