aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShawn Pearce <spearce@spearce.org>2015-12-16 10:29:01 -0500
committerGerrit Code Review @ Eclipse.org <gerrit@eclipse.org>2015-12-16 10:29:02 -0500
commita3e9876d8fe6c818a2405bf5b78234645d489820 (patch)
tree1d4668c7ce11737328dcb34a4f50d278301b66c2
parentb00c83560bf2dc962d92464d169aabeb87127ec6 (diff)
parent6340c76d8b50a48c3700f874bad3e6ece7349802 (diff)
downloadjgit-a3e9876d8fe6c818a2405bf5b78234645d489820.tar.gz
jgit-a3e9876d8fe6c818a2405bf5b78234645d489820.zip
Merge "Fix InterruptTimer leak in BasePackConnection"
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackConnection.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackConnection.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackConnection.java
index 7f9cec734d..aa36aeb1be 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackConnection.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackConnection.java
@@ -143,7 +143,9 @@ abstract class BasePackConnection extends BaseConnection {
final int timeout = transport.getTimeout();
if (timeout > 0) {
final Thread caller = Thread.currentThread();
- myTimer = new InterruptTimer(caller.getName() + "-Timer"); //$NON-NLS-1$
+ if (myTimer == null) {
+ myTimer = new InterruptTimer(caller.getName() + "-Timer"); //$NON-NLS-1$
+ }
timeoutIn = new TimeoutInputStream(myIn, myTimer);
timeoutOut = new TimeoutOutputStream(myOut, myTimer);
timeoutIn.setTimeout(timeout * 1000);