1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-03 15:15:25 +02:00

try non-ssl if there is a ssl handshake exception during with server

This commit is contained in:
David McKnight 2006-07-26 16:48:53 +00:00
parent 459b960d22
commit 1226ebf334

View file

@ -22,6 +22,8 @@ import java.security.cert.X509Certificate;
import java.util.List;
import java.util.Vector;
import javax.net.ssl.SSLHandshakeException;
import org.eclipse.core.runtime.FileLocator;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.dstore.core.client.ClientConnection;
@ -636,13 +638,16 @@ public class DStoreConnectorService extends AbstractConnectorService implements
}
// connect to launched server
connectStatus = clientConnection.connect(launchStatus.getTicket(), timeout);
if (!connectStatus.isConnected() && connectStatus.getMessage().startsWith(ClientConnection.CANNOT_CONNECT))
if (!connectStatus.isConnected() &&
(connectStatus.getMessage().startsWith(ClientConnection.CANNOT_CONNECT) ||
connectStatus.getException() instanceof SSLHandshakeException)
)
{
launchStatus = launchServer(clientConnection, info, daemonPort, monitor);
if (!launchStatus.isConnected())
{
launchFailed = true;
SystemBasePlugin.logError("Error launching server: " + launchStatus.getMessage(), null);
}
else
{