Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Valenta2005-03-16 21:20:46 +0000
committerMichael Valenta2005-03-16 21:20:46 +0000
commit41a09aaff4ec526516986a4812e47d35babd3285 (patch)
treedffe5b7117e6d85ddea686b21f36bf74296c58e4 /bundles/org.eclipse.team.cvs.ssh2
parent70c32fa8ccefb06e292fbf66d58c59bec1a85a35 (diff)
downloadeclipse.platform.team-41a09aaff4ec526516986a4812e47d35babd3285.tar.gz
eclipse.platform.team-41a09aaff4ec526516986a4812e47d35babd3285.tar.xz
eclipse.platform.team-41a09aaff4ec526516986a4812e47d35babd3285.zip
Bug 85911 [SSH2] Incorrect interperatation of the connection error
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.java10
1 files changed, 5 insertions, 5 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 3140be609..db577de92 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
@@ -117,7 +117,7 @@ public class CVSSSH2ServerConnection implements IServerConnection {
} catch (JSchException ee) {
retry--;
if(retry<0){
- throw new CVSAuthenticationException(Policy.bind("CVSSSH2ServerConnection.3"), CVSAuthenticationException.NO_RETRY); //$NON-NLS-1$
+ throw ee;
}
if(session.isConnected()){
session.disconnect();
@@ -143,8 +143,8 @@ public class CVSSSH2ServerConnection implements IServerConnection {
if (e.toString().indexOf("invalid server's version string") == -1) { //$NON-NLS-1$
String message = e.getMessage();
if (message.equals("Auth fail")) { //$NON-NLS-1$
- message = Policy.bind("CVSSSH2ServerConnection.0"); //$NON-NLS-1$
- // Could possibly retry below but wont just in case
+ // Do not retry as the Jsh library has it's own retry logic
+ throw new CVSAuthenticationException(Policy.bind("CVSSSH2ServerConnection.0"), CVSAuthenticationException.NO_RETRY); //$NON-NLS-1$
} else if (message.startsWith("Session.connect: ")) { //$NON-NLS-1$
// Jsh has messages formatted like "Session.connect: java.net.NoRouteToHostException: ..."
// Strip of the exception and try to convert it to a more meaningfull string
@@ -164,11 +164,11 @@ public class CVSSSH2ServerConnection implements IServerConnection {
}
}
}
- throw new CVSAuthenticationException(message, CVSAuthenticationException.NO_RETRY);
+ throw new IOException(message);
}
ssh1 = new SSHServerConnection(location, password);
if (ssh1 == null) {
- throw new CVSAuthenticationException(e.toString(), CVSAuthenticationException.NO_RETRY);
+ throw new IOException(e.toString());
}
ssh1.open(monitor);
}

Back to the top