From f327ccd103adce493f034dc64d45c23da7f9b9af Mon Sep 17 00:00:00 2001 From: Marc Khouzam Date: Fri, 28 Nov 2014 17:55:44 -0500 Subject: [PATCH] Bug 453568 - RM.done() can be called twice under heavy load at termination Change-Id: I2a02ff21a1b4a928df29b5c95c6293e7667bc48f Signed-off-by: Marc Khouzam Reviewed-on: https://git.eclipse.org/r/37312 Reviewed-by: Alvaro Sanchez-Leon --- .../org/eclipse/cdt/dsf/gdb/service/command/GDBControl.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/command/GDBControl.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/command/GDBControl.java index 1e0607dd39b..3f0ac45f7a0 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/command/GDBControl.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/command/GDBControl.java @@ -346,8 +346,9 @@ public class GDBControl extends AbstractMIControl implements IGDBControl { public void handleCompleted() { if (isSuccess()) { // Cancel the time out runnable (if it hasn't run yet). - forceQuitTask.cancel(false); - rm.done(); + if (forceQuitTask.cancel(false)) { + rm.done(); + } } // else: the forceQuitTask has or will handle it. // It is good to wait for the forceQuitTask to trigger