Skip to content
Snippets Groups Projects
Commit 1b76676a authored by Eugene Tarassov's avatar Eugene Tarassov
Browse files

Merge branch 'disconnect-bug' into 'master'

TCF Debugger: Fix disconnecting from target

See merge request eclipse/tcf/tcf!3
parents 1f90f3a4 d8b50789
No related branches found
No related tags found
No related merge requests found
...@@ -1466,13 +1466,22 @@ public class TCFLaunch extends Launch { ...@@ -1466,13 +1466,22 @@ public class TCFLaunch extends Launch {
throw new DebugException(new TCFError(x)); throw new DebugException(new TCFError(x));
} }
} }
private boolean getCanTerminateValue() {
return (isConnected() || isConnecting()) && process != null && process.canTerminate();
}
@Override @Override
public boolean canTerminate() { public boolean canTerminate() {
// Make sure to avoid deadlocks
if (Protocol.isDispatchThread()) {
return getCanTerminateValue();
}
try { try {
return new TCFTask<Boolean>(8000) { return new TCFTask<Boolean>(8000) {
public void run() { public void run() {
done(!disconnected && process != null && process.canTerminate()); done(getCanTerminateValue());
} }
}.get(); }.get();
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment