diff options
author | eutarass | 2011-02-16 19:17:36 +0000 |
---|---|---|
committer | eutarass | 2011-02-16 19:17:36 +0000 |
commit | 940d9cf56111f5fe92b335b8ba92560ff06f09b5 (patch) | |
tree | 3011eecb55e55ac05236aa683bf7426126659d06 | |
parent | 7576f88566a7ac2836a63027a42a57986142ad38 (diff) | |
download | org.eclipse.tcf-940d9cf56111f5fe92b335b8ba92560ff06f09b5.tar.gz org.eclipse.tcf-940d9cf56111f5fe92b335b8ba92560ff06f09b5.tar.xz org.eclipse.tcf-940d9cf56111f5fe92b335b8ba92560ff06f09b5.zip |
TCF Debugger: Changed TCFLaunch.terminate() to do nothing instead of returning error if the launch channel is already closed
-rw-r--r-- | plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFLaunch.java | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFLaunch.java b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFLaunch.java index 398315040..bfc485d18 100644 --- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFLaunch.java +++ b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFLaunch.java @@ -899,22 +899,24 @@ public class TCFLaunch extends Launch { try { new TCFTask<Boolean>() { public void run() { - if (process != null && !terminated) { - final Runnable done = this; - process.terminate(new IProcesses.DoneCommand() { - public void doneCommand(IToken token, Exception e) { - if (e != null) { - error(e); - } - else { - terminated = true; - Protocol.invokeLater(done); + if (channel != null && channel.getState() == IChannel.STATE_OPEN) { + if (process != null && !terminated) { + final Runnable done = this; + process.terminate(new IProcesses.DoneCommand() { + public void doneCommand(IToken token, Exception e) { + if (e != null) { + error(e); + } + else { + terminated = true; + Protocol.invokeLater(done); + } } - } - }); - return; + }); + return; + } + closeChannel(); } - closeChannel(); done(true); } }.get(); |