mirror of
https://github.com/refraction-networking/uquic.git
synced 2025-04-03 20:27:35 +03:00
make it possible to use a custom tracer and the default tracer in tests
This commit is contained in:
parent
b94a4440cc
commit
7ee88def4a
2 changed files with 6 additions and 2 deletions
|
@ -85,7 +85,7 @@ var _ = Describe("Key Update tests", func() {
|
|||
sess, err := quic.DialAddr(
|
||||
fmt.Sprintf("localhost:%d", server.Addr().(*net.UDPAddr).Port),
|
||||
getTLSClientConfig(),
|
||||
&quic.Config{Tracer: newTracer(func() logging.ConnectionTracer { return &keyUpdateConnTracer{} })},
|
||||
getQuicConfig(&quic.Config{Tracer: newTracer(func() logging.ConnectionTracer { return &keyUpdateConnTracer{} })}),
|
||||
)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
str, err := sess.AcceptUniStream(context.Background())
|
||||
|
|
|
@ -272,7 +272,11 @@ func getQuicConfig(conf *quic.Config) *quic.Config {
|
|||
} else {
|
||||
conf = conf.Clone()
|
||||
}
|
||||
conf.Tracer = quicConfigTracer
|
||||
if conf.Tracer == nil {
|
||||
conf.Tracer = quicConfigTracer
|
||||
} else if quicConfigTracer != nil {
|
||||
conf.Tracer = logging.NewMultiplexedTracer(quicConfigTracer, conf.Tracer)
|
||||
}
|
||||
return conf
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue