mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-03 13:52:09 +03:00
fix: catch stop() already called on concurrent 429s
Multiple concurrent requests can receive 429 simultaneously, causing stop() to be called on an already-stopped limiter. Add .catch() to prevent unhandled rejection. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -352,7 +352,7 @@ export function updateFromHeaders(provider, connectionId, headers, status, model
|
||||
// After stop, delete from Map so getLimiter() creates a fresh instance.
|
||||
limiter.stop({ dropWaitingJobs: true }).then(() => {
|
||||
limiters.delete(limiterKey);
|
||||
});
|
||||
}).catch(() => {});
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user