Skip to main content

cmd6211_reply_failure_should_retry

Function cmd6211_reply_failure_should_retry 

Source
pub fn cmd6211_reply_failure_should_retry(
    err: &QotSubError,
    backend_connected: bool,
    failed_times: u32,
) -> bool
Expand description

GitHub issue #55:一次 CMD6211 失败后是否按 C++ 语义重发。

Ref: C++ MktQotSub.cpp:289-340 OnReply_SubOrUnSubenProtoRetSvrReply 时解包 SubscribeSetRsp.result != 0SvrFailed;解包失败 / 超时 / 网络错都保持 bRet=false,统一走 m_nReqFailedTimes++ >= SubFailedRetryMax 判定 → 未达上限 StartSendSubReqTimer() 重发同一份 desired set。 Timer_SendSubReq (:426-437) 首行 If_ReturnVoid(!IsConnLogined(Quote)): 连接未登录不发,账本留给重连后的 ReSub 重放 —— 对应 Rust backend_connected=false 不重试(caller 走 route-dead 本地记账路径)。

WriterAdmissionRejected 是 Rust 侧 dispatch 准入门(replay fence / qot-right reconnect),不是 wire 结果,不重试;UnsupportedMarket / PartialMarketFailure 是发送前 plan 错 / 多市场汇总,不在单次发送层面重试。