mirror of
https://github.com/golang/go
synced 2024-09-25 05:20:13 -06:00
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 <bradfitz@golang.org>
This commit is contained in:
parent
4a0dad211c
commit
1058aecf61
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user