浏览代码

Merge "Fix InterruptTimer leak in BasePackConnection"

tags/v4.2.0.201601211800-r
Shawn Pearce 8 年前
父节点
当前提交
a3e9876d8f
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3
    1
      org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackConnection.java

+ 3
- 1
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);

正在加载...
取消
保存