forked from quic-go/quic-go
introduce Transport.ConnContext, use client's context on the connection (#4507)
* introduce Transport.ConnContext, use client's context on the connection * panic if ConnContext returns nil
This commit is contained in:
@@ -33,6 +33,7 @@ var _ = Describe("Client", func() {
|
||||
config *Config
|
||||
|
||||
originalClientConnConstructor func(
|
||||
ctx context.Context,
|
||||
conn sendConn,
|
||||
runner connRunner,
|
||||
destConnID protocol.ConnectionID,
|
||||
@@ -44,7 +45,6 @@ var _ = Describe("Client", func() {
|
||||
enable0RTT bool,
|
||||
hasNegotiatedVersion bool,
|
||||
tracer *logging.ConnectionTracer,
|
||||
tracingID ConnectionTracingID,
|
||||
logger utils.Logger,
|
||||
v protocol.Version,
|
||||
) quicConn
|
||||
@@ -112,6 +112,7 @@ var _ = Describe("Client", func() {
|
||||
|
||||
run := make(chan struct{})
|
||||
newClientConnection = func(
|
||||
_ context.Context,
|
||||
_ sendConn,
|
||||
_ connRunner,
|
||||
_ protocol.ConnectionID,
|
||||
@@ -123,7 +124,6 @@ var _ = Describe("Client", func() {
|
||||
enable0RTT bool,
|
||||
_ bool,
|
||||
_ *logging.ConnectionTracer,
|
||||
_ ConnectionTracingID,
|
||||
_ utils.Logger,
|
||||
_ protocol.Version,
|
||||
) quicConn {
|
||||
@@ -149,6 +149,7 @@ var _ = Describe("Client", func() {
|
||||
readyChan := make(chan struct{})
|
||||
done := make(chan struct{})
|
||||
newClientConnection = func(
|
||||
_ context.Context,
|
||||
_ sendConn,
|
||||
runner connRunner,
|
||||
_ protocol.ConnectionID,
|
||||
@@ -160,7 +161,6 @@ var _ = Describe("Client", func() {
|
||||
enable0RTT bool,
|
||||
_ bool,
|
||||
_ *logging.ConnectionTracer,
|
||||
_ ConnectionTracingID,
|
||||
_ utils.Logger,
|
||||
_ protocol.Version,
|
||||
) quicConn {
|
||||
@@ -186,6 +186,7 @@ var _ = Describe("Client", func() {
|
||||
|
||||
testErr := errors.New("early handshake error")
|
||||
newClientConnection = func(
|
||||
_ context.Context,
|
||||
_ sendConn,
|
||||
_ connRunner,
|
||||
_ protocol.ConnectionID,
|
||||
@@ -197,7 +198,6 @@ var _ = Describe("Client", func() {
|
||||
_ bool,
|
||||
_ bool,
|
||||
_ *logging.ConnectionTracer,
|
||||
_ ConnectionTracingID,
|
||||
_ utils.Logger,
|
||||
_ protocol.Version,
|
||||
) quicConn {
|
||||
@@ -271,6 +271,7 @@ var _ = Describe("Client", func() {
|
||||
var conf *Config
|
||||
done := make(chan struct{})
|
||||
newClientConnection = func(
|
||||
_ context.Context,
|
||||
connP sendConn,
|
||||
_ connRunner,
|
||||
_ protocol.ConnectionID,
|
||||
@@ -282,7 +283,6 @@ var _ = Describe("Client", func() {
|
||||
_ bool,
|
||||
_ bool,
|
||||
_ *logging.ConnectionTracer,
|
||||
_ ConnectionTracingID,
|
||||
_ utils.Logger,
|
||||
versionP protocol.Version,
|
||||
) quicConn {
|
||||
@@ -314,6 +314,7 @@ var _ = Describe("Client", func() {
|
||||
It("creates a new connections after version negotiation", func() {
|
||||
var counter int
|
||||
newClientConnection = func(
|
||||
_ context.Context,
|
||||
_ sendConn,
|
||||
runner connRunner,
|
||||
_ protocol.ConnectionID,
|
||||
@@ -325,7 +326,6 @@ var _ = Describe("Client", func() {
|
||||
_ bool,
|
||||
hasNegotiatedVersion bool,
|
||||
_ *logging.ConnectionTracer,
|
||||
_ ConnectionTracingID,
|
||||
_ utils.Logger,
|
||||
versionP protocol.Version,
|
||||
) quicConn {
|
||||
|
||||
Reference in New Issue
Block a user