[net] http2: initialize Transport on NewClientConn

0 views
Skip to first unread message

Gopher Robot (Gerrit)

unread,
Jun 30, 2026, 4:52:45 PM (19 hours ago) Jun 30
to Damien Neil, goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Russ Cox, Nicholas Husin, Nicholas Husin, golang...@luci-project-accounts.iam.gserviceaccount.com, golang-co...@googlegroups.com

Gopher Robot submitted the change

Change information

Commit message:
http2: initialize Transport on NewClientConn

Add a missing init call in the NewClientConn path.

Missing init calls are hard to write a test for, since the
Transport test infrastructure causes the Transport to be
initialized before the test begins. So instead, make it harder
to forget the call: init now returns the net/http *Transport,
so code which uses it needs to call init to get it.

Fixes golang/go#80198
Change-Id: Ib6465b863bb0be3cd3d02d9c1bb349526a6a6964
Reviewed-by: Nicholas Husin <n...@golang.org>
Auto-Submit: Damien Neil <dn...@google.com>
Reviewed-by: Nicholas Husin <hu...@google.com>
Files:
  • M http2/export_wrap_test.go
  • M http2/transport_wrap.go
Change size: S
Delta: 2 files changed, 14 insertions(+), 13 deletions(-)
Branch: refs/heads/master
Submit Requirements:
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: net
Gerrit-Branch: master
Gerrit-Change-Id: Ib6465b863bb0be3cd3d02d9c1bb349526a6a6964
Gerrit-Change-Number: 795600
Gerrit-PatchSet: 3
Gerrit-Owner: Damien Neil <dn...@google.com>
Gerrit-Reviewer: Damien Neil <dn...@google.com>
Gerrit-Reviewer: Gopher Robot <go...@golang.org>
Gerrit-Reviewer: Nicholas Husin <hu...@google.com>
Gerrit-Reviewer: Nicholas Husin <n...@golang.org>
Gerrit-CC: Russ Cox <r...@golang.org>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages