修复期权链拉取触发 OKX 50011 限频
为 instruments 加进程缓存并在限频时回退旧数据,前端遇 50011 不再连打重试。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1262,10 +1262,14 @@
|
||||
if (seq !== chainLoadSeq) return;
|
||||
if (d && d.ok && chainHasExpiries(d)) break;
|
||||
lastMsg = (d && (d.msg || d.chain_error)) || "暂无到期日";
|
||||
const rateLimited =
|
||||
/50011|Too Many Requests|RateLimit/i.test(String(lastMsg || ""));
|
||||
d = null;
|
||||
if (attempt === 0) {
|
||||
if (attempt === 0 && !rateLimited) {
|
||||
if (!soft) setExpirySelectStatus("重试加载到期日…");
|
||||
await new Promise(function (resolve) { setTimeout(resolve, 400); });
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (seq !== chainLoadSeq) return;
|
||||
|
||||
Reference in New Issue
Block a user