File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
src/applications/repository/daemon Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -139,13 +139,19 @@ public function run() {
139139 $ this ->pullRepository ($ repository );
140140
141141 if (!$ no_discovery ) {
142+ // TODO: It would be nice to discover only if we pulled something,
143+ // but this isn't totally trivial.
144+
142145 $ lock_name = get_class ($ this ).': ' .$ callsign ;
143146 $ lock = PhabricatorGlobalLock::newLock ($ lock_name );
144147 $ lock ->lock ();
145148
146- // TODO: It would be nice to discover only if we pulled something,
147- // but this isn't totally trivial.
148- $ this ->discoverRepository ($ repository );
149+ try {
150+ $ this ->discoverRepository ($ repository );
151+ } catch (Exception $ ex ) {
152+ $ lock ->unlock ();
153+ throw $ ex ;
154+ }
149155
150156 $ lock ->unlock ();
151157 }
You can’t perform that action at this time.
0 commit comments