mirror of
https://github.com/refraction-networking/uquic.git
synced 2025-04-04 20:57:36 +03:00
remove unused initialVersion variable in session
This commit is contained in:
parent
9693a46d31
commit
ad7d90779a
4 changed files with 3 additions and 22 deletions
|
@ -281,7 +281,6 @@ func (c *client) dial(ctx context.Context) error {
|
||||||
c.config,
|
c.config,
|
||||||
c.tlsConf,
|
c.tlsConf,
|
||||||
c.initialPacketNumber,
|
c.initialPacketNumber,
|
||||||
c.version,
|
|
||||||
c.use0RTT,
|
c.use0RTT,
|
||||||
c.hasNegotiatedVersion,
|
c.hasNegotiatedVersion,
|
||||||
c.tracer,
|
c.tracer,
|
||||||
|
|
|
@ -39,7 +39,6 @@ var _ = Describe("Client", func() {
|
||||||
conf *Config,
|
conf *Config,
|
||||||
tlsConf *tls.Config,
|
tlsConf *tls.Config,
|
||||||
initialPacketNumber protocol.PacketNumber,
|
initialPacketNumber protocol.PacketNumber,
|
||||||
initialVersion protocol.VersionNumber,
|
|
||||||
enable0RTT bool,
|
enable0RTT bool,
|
||||||
hasNegotiatedVersion bool,
|
hasNegotiatedVersion bool,
|
||||||
tracer logging.ConnectionTracer,
|
tracer logging.ConnectionTracer,
|
||||||
|
@ -127,7 +126,6 @@ var _ = Describe("Client", func() {
|
||||||
_ *Config,
|
_ *Config,
|
||||||
_ *tls.Config,
|
_ *tls.Config,
|
||||||
_ protocol.PacketNumber,
|
_ protocol.PacketNumber,
|
||||||
_ protocol.VersionNumber,
|
|
||||||
_ bool,
|
_ bool,
|
||||||
_ bool,
|
_ bool,
|
||||||
_ logging.ConnectionTracer,
|
_ logging.ConnectionTracer,
|
||||||
|
@ -160,7 +158,6 @@ var _ = Describe("Client", func() {
|
||||||
_ *Config,
|
_ *Config,
|
||||||
tlsConf *tls.Config,
|
tlsConf *tls.Config,
|
||||||
_ protocol.PacketNumber,
|
_ protocol.PacketNumber,
|
||||||
_ protocol.VersionNumber,
|
|
||||||
_ bool,
|
_ bool,
|
||||||
_ bool,
|
_ bool,
|
||||||
_ logging.ConnectionTracer,
|
_ logging.ConnectionTracer,
|
||||||
|
@ -193,7 +190,6 @@ var _ = Describe("Client", func() {
|
||||||
_ *Config,
|
_ *Config,
|
||||||
tlsConf *tls.Config,
|
tlsConf *tls.Config,
|
||||||
_ protocol.PacketNumber,
|
_ protocol.PacketNumber,
|
||||||
_ protocol.VersionNumber,
|
|
||||||
_ bool,
|
_ bool,
|
||||||
_ bool,
|
_ bool,
|
||||||
_ logging.ConnectionTracer,
|
_ logging.ConnectionTracer,
|
||||||
|
@ -232,7 +228,6 @@ var _ = Describe("Client", func() {
|
||||||
_ *Config,
|
_ *Config,
|
||||||
_ *tls.Config,
|
_ *tls.Config,
|
||||||
_ protocol.PacketNumber,
|
_ protocol.PacketNumber,
|
||||||
_ protocol.VersionNumber,
|
|
||||||
enable0RTT bool,
|
enable0RTT bool,
|
||||||
_ bool,
|
_ bool,
|
||||||
_ logging.ConnectionTracer,
|
_ logging.ConnectionTracer,
|
||||||
|
@ -275,7 +270,6 @@ var _ = Describe("Client", func() {
|
||||||
_ *Config,
|
_ *Config,
|
||||||
_ *tls.Config,
|
_ *tls.Config,
|
||||||
_ protocol.PacketNumber,
|
_ protocol.PacketNumber,
|
||||||
_ protocol.VersionNumber,
|
|
||||||
enable0RTT bool,
|
enable0RTT bool,
|
||||||
_ bool,
|
_ bool,
|
||||||
_ logging.ConnectionTracer,
|
_ logging.ConnectionTracer,
|
||||||
|
@ -323,7 +317,6 @@ var _ = Describe("Client", func() {
|
||||||
_ *Config,
|
_ *Config,
|
||||||
_ *tls.Config,
|
_ *tls.Config,
|
||||||
_ protocol.PacketNumber,
|
_ protocol.PacketNumber,
|
||||||
_ protocol.VersionNumber,
|
|
||||||
_ bool,
|
_ bool,
|
||||||
_ bool,
|
_ bool,
|
||||||
_ logging.ConnectionTracer,
|
_ logging.ConnectionTracer,
|
||||||
|
@ -366,7 +359,6 @@ var _ = Describe("Client", func() {
|
||||||
_ *Config,
|
_ *Config,
|
||||||
_ *tls.Config,
|
_ *tls.Config,
|
||||||
_ protocol.PacketNumber,
|
_ protocol.PacketNumber,
|
||||||
_ protocol.VersionNumber,
|
|
||||||
_ bool,
|
_ bool,
|
||||||
_ bool,
|
_ bool,
|
||||||
_ logging.ConnectionTracer,
|
_ logging.ConnectionTracer,
|
||||||
|
@ -418,7 +410,6 @@ var _ = Describe("Client", func() {
|
||||||
_ *Config,
|
_ *Config,
|
||||||
_ *tls.Config,
|
_ *tls.Config,
|
||||||
_ protocol.PacketNumber,
|
_ protocol.PacketNumber,
|
||||||
_ protocol.VersionNumber,
|
|
||||||
_ bool,
|
_ bool,
|
||||||
_ bool,
|
_ bool,
|
||||||
_ logging.ConnectionTracer,
|
_ logging.ConnectionTracer,
|
||||||
|
@ -538,7 +529,6 @@ var _ = Describe("Client", func() {
|
||||||
configP *Config,
|
configP *Config,
|
||||||
_ *tls.Config,
|
_ *tls.Config,
|
||||||
_ protocol.PacketNumber,
|
_ protocol.PacketNumber,
|
||||||
_ protocol.VersionNumber, /* initial version */
|
|
||||||
_ bool,
|
_ bool,
|
||||||
_ bool,
|
_ bool,
|
||||||
_ logging.ConnectionTracer,
|
_ logging.ConnectionTracer,
|
||||||
|
@ -580,7 +570,6 @@ var _ = Describe("Client", func() {
|
||||||
configP *Config,
|
configP *Config,
|
||||||
_ *tls.Config,
|
_ *tls.Config,
|
||||||
pn protocol.PacketNumber,
|
pn protocol.PacketNumber,
|
||||||
version protocol.VersionNumber,
|
|
||||||
_ bool,
|
_ bool,
|
||||||
hasNegotiatedVersion bool,
|
hasNegotiatedVersion bool,
|
||||||
_ logging.ConnectionTracer,
|
_ logging.ConnectionTracer,
|
||||||
|
@ -591,7 +580,6 @@ var _ = Describe("Client", func() {
|
||||||
sess.EXPECT().HandshakeComplete().Return(context.Background())
|
sess.EXPECT().HandshakeComplete().Return(context.Background())
|
||||||
if counter == 0 {
|
if counter == 0 {
|
||||||
Expect(pn).To(BeZero())
|
Expect(pn).To(BeZero())
|
||||||
Expect(version).To(Equal(initialVersion))
|
|
||||||
Expect(hasNegotiatedVersion).To(BeFalse())
|
Expect(hasNegotiatedVersion).To(BeFalse())
|
||||||
sess.EXPECT().run().Return(&errCloseForRecreating{
|
sess.EXPECT().run().Return(&errCloseForRecreating{
|
||||||
nextPacketNumber: 109,
|
nextPacketNumber: 109,
|
||||||
|
@ -599,8 +587,6 @@ var _ = Describe("Client", func() {
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
Expect(pn).To(Equal(protocol.PacketNumber(109)))
|
Expect(pn).To(Equal(protocol.PacketNumber(109)))
|
||||||
Expect(version).ToNot(Equal(initialVersion))
|
|
||||||
Expect(version).To(Equal(protocol.VersionNumber(789)))
|
|
||||||
Expect(hasNegotiatedVersion).To(BeTrue())
|
Expect(hasNegotiatedVersion).To(BeTrue())
|
||||||
sess.EXPECT().run()
|
sess.EXPECT().run()
|
||||||
}
|
}
|
||||||
|
|
|
@ -132,10 +132,9 @@ type session struct {
|
||||||
|
|
||||||
srcConnIDLen int
|
srcConnIDLen int
|
||||||
|
|
||||||
perspective protocol.Perspective
|
perspective protocol.Perspective
|
||||||
initialVersion protocol.VersionNumber // if version negotiation is performed, this is the version we initially tried
|
version protocol.VersionNumber
|
||||||
version protocol.VersionNumber
|
config *Config
|
||||||
config *Config
|
|
||||||
|
|
||||||
conn sendConn
|
conn sendConn
|
||||||
sendQueue *sendQueue
|
sendQueue *sendQueue
|
||||||
|
@ -356,7 +355,6 @@ var newClientSession = func(
|
||||||
conf *Config,
|
conf *Config,
|
||||||
tlsConf *tls.Config,
|
tlsConf *tls.Config,
|
||||||
initialPacketNumber protocol.PacketNumber,
|
initialPacketNumber protocol.PacketNumber,
|
||||||
initialVersion protocol.VersionNumber,
|
|
||||||
enable0RTT bool,
|
enable0RTT bool,
|
||||||
hasNegotiatedVersion bool,
|
hasNegotiatedVersion bool,
|
||||||
tracer logging.ConnectionTracer,
|
tracer logging.ConnectionTracer,
|
||||||
|
@ -374,7 +372,6 @@ var newClientSession = func(
|
||||||
logID: destConnID.String(),
|
logID: destConnID.String(),
|
||||||
logger: logger,
|
logger: logger,
|
||||||
tracer: tracer,
|
tracer: tracer,
|
||||||
initialVersion: initialVersion,
|
|
||||||
versionNegotiated: hasNegotiatedVersion,
|
versionNegotiated: hasNegotiatedVersion,
|
||||||
version: v,
|
version: v,
|
||||||
}
|
}
|
||||||
|
|
|
@ -2225,7 +2225,6 @@ var _ = Describe("Client Session", func() {
|
||||||
quicConf,
|
quicConf,
|
||||||
tlsConf,
|
tlsConf,
|
||||||
42, // initial packet number
|
42, // initial packet number
|
||||||
protocol.VersionTLS,
|
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
tracer,
|
tracer,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue