Merge pull request #2319 from lucas-clemente/fix-stream-open-request-cancelation

use the HTTP request context when opening the request stream
This commit is contained in:
Marten Seemann
2020-01-29 00:08:43 +07:00
committed by GitHub
2 changed files with 3 additions and 4 deletions

View File

@@ -2,7 +2,6 @@ package http3
import (
"bytes"
"context"
"crypto/tls"
"errors"
"fmt"
@@ -150,7 +149,7 @@ func (c *client) RoundTrip(req *http.Request) (*http.Response, error) {
return nil, c.handshakeErr
}
str, err := c.session.OpenStreamSync(context.Background())
str, err := c.session.OpenStreamSync(req.Context())
if err != nil {
return nil, err
}