소스 검색

Merge remote-tracking branch 'fduch/fix-dumper-lock-release'

Jordi Boggiano 9 년 전
부모
커밋
65768e2555
1개의 변경된 파일5개의 추가작업 그리고 2개의 파일을 삭제
  1. 5 2
      src/Packagist/WebBundle/Command/DumpPackagesCommand.php

+ 5 - 2
src/Packagist/WebBundle/Command/DumpPackagesCommand.php

@@ -86,8 +86,11 @@ class DumpPackagesCommand extends ContainerAwareCommand
             return;
         }
 
-        $result = $this->getContainer()->get('packagist.package_dumper')->dump($ids, $force, $verbose);
-        $lock->release();
+        try {
+             $result = $this->getContainer()->get('packagist.package_dumper')->dump($ids, $force, $verbose);
+        } finally {
+             $lock->release();
+        }
 
         return $result ? 0 : 1;
     }