> On 28 Nov 2020, at 11:22 pm, b.ca...@pobox.com <b.cand...@pobox.com> wrote: > > > My actual query was to learn how the removal of the broken connection is > > done. > > Ah OK. I'm not familiar with this code (net/http/transport.go), and you've > already shown that the PutIdleConn trace action isn't called. Maybe this > comment is helpful:
No worries at all. The PutIdleConn is not called for HTTP/2 connections which I found to be the case for https://godoc.org <http://godoc.org/>, but when I used http://godoc.org <http://godoc.org/> (in my example that I shared), it was called and the error was nil. > > if pconn.isBroken() || tooOld { > // If either persistConn.readLoop has marked > the connection > // broken, but Transport.removeIdleConn has > not yet removed it > // from the idle list, or if this persistConn > is too old (it was > // idle too long), then ignore it and look > for another. In both > // cases it's already in the process of being > closed. > list = list[:len(list)-1] > continue > } > > Otherwise someone else can answer more specifically. No problems. I did start looking at the above isBroken() method, but sort of got lost. > > -- > 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 > <mailto:golang-nuts+unsubscr...@googlegroups.com>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/golang-nuts/613e3778-7892-4ab9-8cc8-6db1a3e8f966n%40googlegroups.com > > <https://groups.google.com/d/msgid/golang-nuts/613e3778-7892-4ab9-8cc8-6db1a3e8f966n%40googlegroups.com?utm_medium=email&utm_source=footer>. -- 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/2FAC9A9D-BF72-4566-9981-CA74233E8917%40gmail.com.