Files
iptvnator/docs/architecture
4grayandClaude Fable 5 2cf0ff8214 fix(stalker): abandon a timed-out portal authentication before advancing
Closes #1356.

Discovery wrapped `authenticate()` in a timeout that rejected only the
wrapper — the underlying flow kept running, so a late `get_profile` could land
after a healthy candidate had already authenticated. `get_profile` is what
adopts a token for the MAC portal-side, so the abandoned attempt invalidated
the working candidate's token and discovery reported a live portal as refused.

`authenticate()` now takes an `AbortSignal` and checks it before every portal
call; discovery gives each confirmation its own controller and aborts it when
the attempt exceeds its budget.

The issue proposed threading the signal through IPC to axios. That does not
address this harm: once a request is on the wire the server processes it
whether or not the client tears the socket down, so only NOT SENDING the
request prevents the adoption — which is what the between-calls check
guarantees. Cancellation is therefore cooperative by design.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-03 18:41:54 +02:00
..