From 0048b69c038306fe74408a63cdd0773b0d86a8fe Mon Sep 17 00:00:00 2001 From: Doug Anderson Date: Tue, 21 Dec 2010 13:39:23 -0800 Subject: Fixed race condition in 'repo sync -jN' that would open multiple masters. This fixes the SSH Control Masters to be managed in a thread-safe fashion. This is important because "repo sync -jN" uses threads to sync more than one repository at the same time. The problem didn't show up earlier because it was masked if all of the threads tried to connect to the same host that was used on the "repo init" line. --- main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'main.py') diff --git a/main.py b/main.py index 70ddeffa..31a18e18 100755 --- a/main.py +++ b/main.py @@ -28,7 +28,7 @@ import re import sys from trace import SetTrace -from git_config import close_ssh +from git_config import init_ssh, close_ssh from command import InteractiveCommand from command import MirrorSafeCommand from command import PagedCommand @@ -214,6 +214,7 @@ def _Main(argv): repo = _Repo(opt.repodir) try: try: + init_ssh() repo._Run(argv) finally: close_ssh() -- cgit v1.2.3-54-g00ecf