Fix jail banned IP loading race with AbortController

This commit is contained in:
2026-04-19 19:31:03 +02:00
parent 9e7f881a8a
commit 5446f6c3e1
4 changed files with 34 additions and 4 deletions

View File

@@ -16,7 +16,11 @@ Issues are grouped by category and ordered roughly by severity. Each entry descr
---
### TASK-001 — Race condition in `useJailBannedIps`: missing AbortController
### TASK-001 — Race condition in `useJailBannedIps`: missing AbortController (done)
**Where fixed:** `frontend/src/hooks/useJailBannedIps.ts`, `frontend/src/api/jails.ts`
**Summary:** Added an `AbortController` ref to cancel stale fetches, passed the signal into `fetchJailBannedIps`, and abort on unmount.
**Where found:** `frontend/src/hooks/useJailBannedIps.ts` — the `load` callback is `async` and calls `fetchJailBannedIps` with no AbortSignal.