Clear pending queue before stopping on 404

When flush receives a 404, stop() would re-flush remaining
pending cookies to a dead endpoint. Clear the queue first to
avoid the wasted request.

Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
Émile Ré
2026-05-02 19:42:29 +04:00
parent f439100411
commit a83d313dfa

View File

@@ -143,6 +143,7 @@ export class CookieDetector {
body: { cookies: entries },
}).catch((err) => {
if (err instanceof NotFoundError) {
this.pending.clear();
this.stop();
}
});