SkillPedia Skills Encyclopedia
中文 EN

Skills 2026-06-30 14:35 UTC

estonia-ai-kit

Committed by stefanoamorelli. Update Category: Bug Fixes & Stability Improvements. Commit details: fix(lhv): keep Smart-ID signing alive across LHV idle-connection drops. This update resolves known runtime errors and enhances system reliability.

stefanoamorelli 241878c stefanoamorelli/estonia-ai-kit

CommitRaw commit message

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>