/ go Public
net/http: Client.Do returns different errors on context deadline depending on req/conn state #31863
help wanted NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
What version of Go are you using (
Does this issue reproduce with the latest release?
What operating system and processor architecture are you using (
What did you do?
Run multiple times program on my server (24 cpu)
With single goroutine - problem did not appears.
Problem appeared not every run, but in 3-4 runs at least one was faulty.
What did you expect to see?
all goroutines: done = true, err = Get http://240.0.0.1/test: context deadline exceeded
What did you see instead?
all gouroutines returned at the same time, after 4 seconds, like i specified in parent context.WithTimeout. But some goroutines returned before parentContext.Done was closed (error was i/o timeout), and some gorotines returned after parentCtx.Done was closed (with expected error "context deadline exceeded").
The text was updated successfully, but these errors were encountered: