mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-09 10:05:24 +02:00
Make ssh connection-lost handling more robust
This commit is contained in:
parent
6e734d44bb
commit
a4591b7bc2
1 changed files with 5 additions and 1 deletions
|
@ -367,6 +367,7 @@ public class SshConnectorService extends AbstractConnectorService implements ISs
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (showSessionLostDlg) {
|
if (showSessionLostDlg) {
|
||||||
|
//invokes this.run() on dispatch thread
|
||||||
Display.getDefault().asyncExec(this);
|
Display.getDefault().asyncExec(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -387,9 +388,12 @@ public class SshConnectorService extends AbstractConnectorService implements ISs
|
||||||
dialog.open();
|
dialog.open();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
//TODO I think we should better use a Job for disconnecting?
|
||||||
|
//But what about error messages?
|
||||||
IRunnableContext runnableContext = getRunnableContext(getShell());
|
IRunnableContext runnableContext = getRunnableContext(getShell());
|
||||||
// will do this.run(IProgressMonitor mon)
|
// 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();
|
_connection.reset();
|
||||||
ISystemRegistry sr = RSEUIPlugin.getDefault().getSystemRegistry();
|
ISystemRegistry sr = RSEUIPlugin.getDefault().getSystemRegistry();
|
||||||
sr.connectedStatusChange(_connection.getPrimarySubSystem(), false, true, true);
|
sr.connectedStatusChange(_connection.getPrimarySubSystem(), false, true, true);
|
||||||
|
|
Loading…
Add table
Reference in a new issue