diff options
author | Shawn Pearce <spearce@spearce.org> | 2015-12-16 10:29:01 -0500 |
---|---|---|
committer | Gerrit Code Review @ Eclipse.org <gerrit@eclipse.org> | 2015-12-16 10:29:02 -0500 |
commit | a3e9876d8fe6c818a2405bf5b78234645d489820 (patch) | |
tree | 1d4668c7ce11737328dcb34a4f50d278301b66c2 | |
parent | b00c83560bf2dc962d92464d169aabeb87127ec6 (diff) | |
parent | 6340c76d8b50a48c3700f874bad3e6ece7349802 (diff) | |
download | jgit-a3e9876d8fe6c818a2405bf5b78234645d489820.tar.gz jgit-a3e9876d8fe6c818a2405bf5b78234645d489820.zip |
Merge "Fix InterruptTimer leak in BasePackConnection"
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackConnection.java | 4 |
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); |