Finally, I figure it out and everything is working as expected, so it's 
nothing to do with net/http2.

For more details, please refer to this issue: 
https://github.com/golang/go/issues/50000. And it's a nice issue number 
indeed :>.

在2021年12月7日星期二 UTC+8 18:33:34<jerome....@gmail.com> 写道:

> nice issue number :)
>
> Le mardi 7 décembre 2021 à 05:54:13 UTC+1, zzk...@gmail.com a écrit :
>
>> I had opened an issue on the Golang repo, in case anyone interested.
>>
>> net/http2: client immediately close most of connections via forward proxy 
>> even if idleConn was configured · Issue #50000 · golang/go (github.com) 
>> <https://github.com/golang/go/issues/50000>
>>
>> 在2021年12月6日星期一 UTC+8 11:37:31<zzk code> 写道:
>>
>>> I'm using Go to implement an http client and squid as a forward proxy to 
>>> send requests to remote servers. Things goes well when using http/1.1 via 
>>> proxy or http/1.1, http2 without proxy, however, while using http2 client 
>>> via proxy, most of the connections were closed immediately and only one or 
>>> two were kept.
>>>
>>> Not sure it's my bad code or what. The idleConn configuration was 
>>> enabled on the http transport. Thanks in advance.
>>>
>>> Since there are many code blocks, I post a question including details on 
>>> StackOverflow. Is there anyone who could give some suggestions that what 
>>> should I do to figure it out? Thanks.
>>>
>>> go - Golang: http2 client immediately close connections via proxy while 
>>> idleConn was enabled - Stack Overflow 
>>> <https://stackoverflow.com/questions/70234961/golang-http2-client-immediately-close-connections-via-proxy-while-idleconn-was>
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/097afe9a-10fc-4899-ac8d-980c6178d379n%40googlegroups.com.

Reply via email to