http_client: don't arm the websocket timeout after a failed connect #204

Merged
vitalif merged 1 commits from koolkhel/vitastor:http-ws-stray-timer into master 2026-11-29 14:13:58 +03:00

1 Commits

Author SHA1 Message Date
42fc5bdda4 http_client: don't arm the websocket timeout after a failed connect
start_ws_connection() armed its timer after resolve_and_connect() even
when the connection had already failed inside it and its callback had
run. Nothing cleared that timer: when it fired, it failed the client's
next request with "Websocket connection timed out". Arm it only while
the connection is in flight, as send_request() does.

Also test the case where the failed request's callback sends the next
request on the same client.
2026-11-29 13:03:56 +03:00