技能 2026-06-30 14:35 UTC
estonia-ai-kit
由提交人 stefanoamorelli 提交,主要更新类型为:问题缺陷修复与稳定性提升。提交说明:fix(lhv): keep Smart-ID signing alive across LHV idle-connection drops。解决了已知运行时异常与边界错误,提升系统稳定性。
Commit提交信息原文
fix(lhv): keep Smart-ID signing alive across LHV idle-connection drops Payment signing aborted with `Post ".../sid": EOF` a few seconds in, before the Smart-ID push could be confirmed on the phone. I compared the CLI against LHV's own web client over a live capture and confirmed the request itself is correct: identical endpoint, method, body, headers and cookies. The difference is purely connection handling. LHV closes idle keep-alive connections after roughly five seconds (its /b/sign responses carry `keep-alive: timeout=5`). During the human pause while confirming on the phone, the pooled connection is closed server-side. Go does not transparently retry a POST that carries a body over such a dropped pooled connection, so the next poll surfaced an EOF, and pollSigningStatus treated that single transient error as fatal and tore the whole signing down. A browser survives this because it silently reopens the connection. I disabled connection reuse on the HTTP clients so each request opens a fresh connection, sidestepping the five-second race, and made the signing poll tolerate a few consecutive transient errors instead of failing on the first one. The existing signing timeout still bounds the loop. Signed-off-by: Stefano Amorelli <stefano@amorelli.tech>