Commit 1058aecf authored by Ingo Oeser's avatar Ingo Oeser Committed by Brad Fitzpatrick

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/134795Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
parent 4a0dad21
......@@ -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
}
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment