Commit 6826f5a
committed
http2: close request bodies before RoundTrip error return
When returning an error from RoundTrip, wait for the close
of the request body to complete before returning.
This avoids a race between the HTTP/2 transport closing
the request body and the net/http retry loop examining
the readTrackingBody to see if it has been closed.
For golang/go#60041
Change-Id: I8be69ff5056806406716e01e02d1f631deeca088
Reviewed-on: https://go-review.googlesource.com/c/net/+/496335
Run-TryBot: Damien Neil <[email protected]>
TryBot-Result: Gopher Robot <[email protected]>
Reviewed-by: Bryan Mills <[email protected]>1 parent ca96da6 commit 6826f5a
1 file changed
+18
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1268 | 1268 | | |
1269 | 1269 | | |
1270 | 1270 | | |
1271 | | - | |
1272 | 1271 | | |
| 1272 | + | |
1273 | 1273 | | |
1274 | 1274 | | |
1275 | 1275 | | |
| |||
1284 | 1284 | | |
1285 | 1285 | | |
1286 | 1286 | | |
| 1287 | + | |
| 1288 | + | |
| 1289 | + | |
| 1290 | + | |
| 1291 | + | |
| 1292 | + | |
| 1293 | + | |
| 1294 | + | |
| 1295 | + | |
| 1296 | + | |
| 1297 | + | |
| 1298 | + | |
| 1299 | + | |
| 1300 | + | |
| 1301 | + | |
| 1302 | + | |
| 1303 | + | |
1287 | 1304 | | |
1288 | 1305 | | |
1289 | 1306 | | |
| |||
0 commit comments