1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

[231686] - [commands] AbstractMIControl.stopCommandProcessing() can throw exceptions if called twice.

This commit is contained in:
Pawel Piech 2008-05-12 22:36:29 +00:00
parent c9c4a33ef3
commit 1de4e83823

View file

@ -144,6 +144,9 @@ public abstract class AbstractMIControl extends AbstractDsfService
}
protected void stopCommandProcessing() {
// Guard against calling this multiple times (e.g. as a result of a
// user request and an event from the back end).
if (fStoppedCommandProcessing) return;
fStoppedCommandProcessing = true;
/*
@ -154,6 +157,7 @@ public abstract class AbstractMIControl extends AbstractDsfService
commandHandle.getRequestMonitor().setStatus(genStatus("Connection is shut down")); //$NON-NLS-1$
commandHandle.getRequestMonitor().done();
}
fCommandQueue.clear();
/*
* Now go through the commands which are outstanding in that they have been sent to the backend.