fix: always send stop on ESC regardless of cached state
Removes the activeState !== 'idle' check before sending the stop command. The server-side Interrupt() is safe to call on an idle agent (returns false, no-op). This fixes an intermittent issue where pressing ESC wouldn't stop the agent because the GUI's cached activeState was stale/out-of-sync with the server's actual state.
This commit is contained in:
parent
9d059943f2
commit
ec89eaae18
|
|
@ -64,7 +64,10 @@ ApplicationWindow {
|
|||
onActivated: {
|
||||
if (renamingIndex >= 0) {
|
||||
cancelRename()
|
||||
} else if (ollie.activeState !== "idle") {
|
||||
} else {
|
||||
// Always send stop - server-side Interrupt() is safe to call
|
||||
// on an idle agent (no-op). This avoids races where the GUI's
|
||||
// cached activeState is stale.
|
||||
ollie.interrupt()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Reference in New Issue