From a4591b7bc201836b47f803c77eb2da9c34fa5a97 Mon Sep 17 00:00:00 2001 From: Martin Oberhuber < martin.oberhuber@windriver.com> Date: Wed, 31 May 2006 16:57:30 +0000 Subject: [PATCH] Make ssh connection-lost handling more robust --- .../rse/connectorservice/ssh/SshConnectorService.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rse/plugins/org.eclipse.rse.connectorservice.ssh/src/org/eclipse/rse/connectorservice/ssh/SshConnectorService.java b/rse/plugins/org.eclipse.rse.connectorservice.ssh/src/org/eclipse/rse/connectorservice/ssh/SshConnectorService.java index 4d8991c34c5..c77a2d7379f 100644 --- a/rse/plugins/org.eclipse.rse.connectorservice.ssh/src/org/eclipse/rse/connectorservice/ssh/SshConnectorService.java +++ b/rse/plugins/org.eclipse.rse.connectorservice.ssh/src/org/eclipse/rse/connectorservice/ssh/SshConnectorService.java @@ -367,6 +367,7 @@ public class SshConnectorService extends AbstractConnectorService implements ISs } } if (showSessionLostDlg) { + //invokes this.run() on dispatch thread Display.getDefault().asyncExec(this); } } @@ -387,9 +388,12 @@ public class SshConnectorService extends AbstractConnectorService implements ISs dialog.open(); try { + //TODO I think we should better use a Job for disconnecting? + //But what about error messages? IRunnableContext runnableContext = getRunnableContext(getShell()); // will do this.run(IProgressMonitor mon) - runnableContext.run(false,true,this); // inthread, cancellable, IRunnableWithProgress + //runnableContext.run(false,true,this); // inthread, cancellable, IRunnableWithProgress + runnableContext.run(true,true,this); // fork, cancellable, IRunnableWithProgress _connection.reset(); ISystemRegistry sr = RSEUIPlugin.getDefault().getSystemRegistry(); sr.connectedStatusChange(_connection.getPrimarySubSystem(), false, true, true);