net/http: Fix test that occasionally fails
The consecutive calls to Head would sometimes get different connections depending on if the readLoop had finished executing and placed its connection on the idle list or not. This change ensures that readLoop completes before we make our second connection. Fixes #11250 Change-Id: Ibdbc4d3d0aba0162452f6dec5928355a37dda70a Reviewed-on: https://go-review.googlesource.com/11170Reviewed-by: Russ Cox <rsc@golang.org>
Showing
Please register or sign in to comment