fix(ook): use process group kill for reliable stop

The OOK subprocess was spawned without start_new_session=True, so
process.terminate() only signalled the parent — child processes kept
running. Now uses os.killpg() to terminate the entire process group,
matching the pattern used by all other routes (ADS-B, AIS, ACARS, etc.).

Also fixes silent error swallowing in the frontend stop handler so the
UI resets even if the backend request fails.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Smittix
2026-03-10 12:32:29 +00:00
parent fd12d11fab
commit e383575c80
2 changed files with 22 additions and 2 deletions

View File

@@ -125,7 +125,13 @@ var OokMode = (function () {
updateUI(false);
disconnectSSE();
})
.catch(function () {});
.catch(function (err) {
console.error('Failed to stop OOK decoder:', err);
// Force UI reset even if backend call failed
state.running = false;
updateUI(false);
disconnectSSE();
});
}
// ---- SSE ----