Fix jail banned IP loading race with AbortController
This commit is contained in:
@@ -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.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user