req icon indicating copy to clipboard operation
req copied to clipboard

H2 release the stream reservation

Open powellnorma opened this issue 1 year ago • 3 comments

I read this comment:

https://github.com/imroc/req/blob/5323efe519c828b9b97dc52f13386e007e5972b5/internal/http2/client_conn_pool.go#L20-L22

But cc.RoundTrip(new(http.Request)) leads to a panic:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x58e3d4]

goroutine 18 [running]:
net/url.(*URL).String(0x0)
        /usr/local/go/src/net/url/url.go:810 +0x34
github.com/imroc/req/v3/internal/http2.(*ClientConn).RoundTrip(0xc00031a300, 0xc0003c8200)
       /req/internal/http2/transport.go:1162 +0x5

How can we release the stream reservation without doing a real RoundTrip?

powellnorma avatar Nov 29 '23 12:11 powellnorma