From 1058aecf611fc85365f87733f8588ef1cd31c8cd Mon Sep 17 00:00:00 2001 From: Ingo Oeser Date: Wed, 12 Sep 2018 01:16:29 +0200 Subject: [PATCH] net/http: configure http2 transport only once it looks like we should abort trying to configure the http2 transport again, once it has been configured already. Otherwise there will be no effect of these checks and changes, as they will be overridden later again and the disable logic below will have no effect, too. So it really looks like we just forgot a return statement here. Change-Id: Ic99b3bbc662a4e1e1bdbde77681bd1ae597255ad Reviewed-on: https://go-review.googlesource.com/134795 Reviewed-by: Brad Fitzpatrick --- src/net/http/transport.go | 1 + 1 file changed, 1 insertion(+) diff --git a/src/net/http/transport.go b/src/net/http/transport.go index ffe4cdc0d6..b8788654b7 100644 --- a/src/net/http/transport.go +++ b/src/net/http/transport.go @@ -286,6 +286,7 @@ func (t *Transport) onceSetNextProtoDefaults() { if v := rv.Field(0); v.CanInterface() { if h2i, ok := v.Interface().(h2Transport); ok { t.h2transport = h2i + return } } }