init(process.getInputStream(), process.getOutputStream());
} catch (TransportException err) {
- close();
throw err;
- } catch (IOException err) {
- close();
+ } catch (Throwable err) {
throw new TransportException(uri,
JGitText.get().remoteHungUpUnexpectedly, err);
+ } finally {
+ close();
}
try {
init(process.getInputStream(), process.getOutputStream());
} catch (TransportException err) {
- close();
throw err;
- } catch (IOException err) {
- close();
+ } catch (Throwable err) {
throw new TransportException(uri,
JGitText.get().remoteHungUpUnexpectedly, err);
+ } finally {
+ close();
}
try {