Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoryamanaka2008-05-09 02:06:12 +0000
committeryamanaka2008-05-09 02:06:12 +0000
commit529b3003176c3446c7550ea7d39534fd86310a24 (patch)
tree6966e0932afd11b1f6fe03b067a5b0fd5ea98e6e /bundles/org.eclipse.team.cvs.ssh2
parent6747bf9cf83488d9e4ab58ee076fd167cd6858b7 (diff)
downloadeclipse.platform.team-529b3003176c3446c7550ea7d39534fd86310a24.tar.gz
eclipse.platform.team-529b3003176c3446c7550ea7d39534fd86310a24.tar.xz
eclipse.platform.team-529b3003176c3446c7550ea7d39534fd86310a24.zip
fix for bug 229982
* The timeout 0 was not effective for I/O from "cvs server". * The timeout value for CVS location will be used for keep-alive interval.
Diffstat (limited to 'bundles/org.eclipse.team.cvs.ssh2')
-rw-r--r--bundles/org.eclipse.team.cvs.ssh2/src/org/eclipse/team/internal/ccvs/ssh2/CVSSSH2ServerConnection.java4
-rw-r--r--bundles/org.eclipse.team.cvs.ssh2/src/org/eclipse/team/internal/ccvs/ssh2/JSchSession.java2
2 files changed, 4 insertions, 2 deletions
diff --git a/bundles/org.eclipse.team.cvs.ssh2/src/org/eclipse/team/internal/ccvs/ssh2/CVSSSH2ServerConnection.java b/bundles/org.eclipse.team.cvs.ssh2/src/org/eclipse/team/internal/ccvs/ssh2/CVSSSH2ServerConnection.java
index 1da232403..2489a6fbb 100644
--- a/bundles/org.eclipse.team.cvs.ssh2/src/org/eclipse/team/internal/ccvs/ssh2/CVSSSH2ServerConnection.java
+++ b/bundles/org.eclipse.team.cvs.ssh2/src/org/eclipse/team/internal/ccvs/ssh2/CVSSSH2ServerConnection.java
@@ -152,13 +152,13 @@ public class CVSSSH2ServerConnection implements IServerConnection {
// Don't close the underlying stream as it belongs to the session
}
},
- 8192 /*bufferSize*/, 1000 /*readTimeout*/, -1 /*closeTimeout*/, true /* growWhenFull */), timeout > 0 ? timeout : 1, monitor);
+ 8192 /*bufferSize*/, (timeout>0 ? 1000 : 0) /*readTimeout*/, -1 /*closeTimeout*/, true /* growWhenFull */), timeout > 0 ? timeout : 1, monitor);
outputStream = new PollingOutputStream(new TimeoutOutputStream(new FilterOutputStream(channel_out) {
public void close() {
// Don't close the underlying stream as it belongs to the session
}
},
- 8192 /*buffersize*/, 1000 /*writeTimeout*/, 1000 /*closeTimeout*/), timeout > 0 ? timeout : 1, monitor);
+ 8192 /*buffersize*/, (timeout>0 ? 1000 : 0) /*writeTimeout*/, (timeout>0 ? 1000 : 0) /*closeTimeout*/), timeout > 0 ? timeout : 1, monitor);
} catch (final JSchException e) {
if (isSSH2Unsupported(e)) {
ssh1 = new SSHServerConnection(location, password);
diff --git a/bundles/org.eclipse.team.cvs.ssh2/src/org/eclipse/team/internal/ccvs/ssh2/JSchSession.java b/bundles/org.eclipse.team.cvs.ssh2/src/org/eclipse/team/internal/ccvs/ssh2/JSchSession.java
index d6f490f28..5d728c499 100644
--- a/bundles/org.eclipse.team.cvs.ssh2/src/org/eclipse/team/internal/ccvs/ssh2/JSchSession.java
+++ b/bundles/org.eclipse.team.cvs.ssh2/src/org/eclipse/team/internal/ccvs/ssh2/JSchSession.java
@@ -86,6 +86,8 @@ class JSchSession {
}
if (session == null)
throw new JSchException(CVSSSH2Messages.JSchSession_4);
+ if (session.getTimeout() != location.getTimeout() * 1000)
+ session.setTimeout(location.getTimeout() * 1000);
JSchSession schSession = new JSchSession(session, location);
pool.put(key, schSession);
return schSession;

Back to the top