Files
Moses Narrow 70037cf71f net/http: fix nil didTimeout deref when a client dial fails
Client.do calls didTimeout() on the error path (line 461), and the contract is
that send() returns a non-nil didTimeout whenever err != nil. TinyGo dropped
setRequestCancel but left the roundTrip error path returning the nil named
return value, so any http.Client{Timeout: ...} request whose dial failed (e.g.
connection refused) panicked with a nil func-value dereference instead of
returning the error. Return alwaysFalse on those error paths, matching the
other error returns in send().

Verified: http.Client{Timeout}.Get to a refused port now returns
"connection refused" instead of panicking.
2026-08-28 09:38:19 +02:00
..