summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorBernd Hufmann2012-10-17 12:56:05 (EDT)
committer Bernd Hufmann2012-10-17 13:28:01 (EDT)
commit2526d61c4ddd5b1341cf1067f5db4e80f5afcff3 (patch)
tree85d1b0334063918e098b7b4119cd1d249a8d3b5f
parent8eef8cb5317c001115b4d509d8520a670081475a (diff)
downloadorg.eclipse.linuxtools-2526d61c4ddd5b1341cf1067f5db4e80f5afcff3.zip
org.eclipse.linuxtools-2526d61c4ddd5b1341cf1067f5db4e80f5afcff3.tar.gz
org.eclipse.linuxtools-2526d61c4ddd5b1341cf1067f5db4e80f5afcff3.tar.bz2
LTTng: Handle cancellation of login gracefully (bug 392197)
Change-Id: I1d2ae0e5f852f7350956f39648f20eac6c25c410 Signed-off-by: Bernd Hufmann <bhufmann@gmail.com> Reviewed-on: https://git.eclipse.org/r/8258 Tested-by: Hudson CI Reviewed-by: Patrick Tasse <patrick.tasse@gmail.com> IP-Clean: Patrick Tasse <patrick.tasse@gmail.com>
-rw-r--r--lttng/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/remote/RemoteSystemProxy.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/lttng/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/remote/RemoteSystemProxy.java b/lttng/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/remote/RemoteSystemProxy.java
index fa2a964..4666d8d 100644
--- a/lttng/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/remote/RemoteSystemProxy.java
+++ b/lttng/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/remote/RemoteSystemProxy.java
@@ -12,6 +12,7 @@
package org.eclipse.linuxtools.internal.lttng2.ui.views.control.remote;
import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.OperationCanceledException;
import org.eclipse.core.runtime.Status;
import org.eclipse.rse.core.model.IHost;
import org.eclipse.rse.core.model.IRSECallback;
@@ -150,7 +151,10 @@ public class RemoteSystemProxy implements IRemoteSystemProxy {
if (!shellSubSystem.isConnected()) {
try {
shellSubSystem.connect(false, callback);
- } catch (Exception e) {
+ } catch (OperationCanceledException e) {
+ callback.done(Status.CANCEL_STATUS, null);
+ }
+ catch (Exception e) {
throw new ExecutionException(e.toString(), e);
}
} else {