Skip to content

Commit

Permalink
fix test assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
tanghaowillow committed Jul 29, 2023
1 parent 30d13a7 commit a3c40a1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/wire/transport_parameter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -697,7 +697,7 @@ var _ = Describe("Transport Parameters", func() {

It("doesn't reject the parameters if the ActiveConnectionIDLimit increased", func() {
p.ActiveConnectionIDLimit = saved.ActiveConnectionIDLimit + 1
Expect(p.ValidForUpdate(saved)).To(BeFalse())
Expect(p.ValidForUpdate(saved)).To(BeTrue())
})
})
})
Expand Down
3 changes: 2 additions & 1 deletion internal/wire/transport_parameters.go
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,8 @@ func (p *TransportParameters) ValidFor0RTT(saved *TransportParameters) bool {
p.ActiveConnectionIDLimit == saved.ActiveConnectionIDLimit
}

// ValidForUpdate checks that the newly received transport parameters do not contain any redueced limit when resuming a 0-RTT connection
// ValidForUpdate checks that the newly received transport parameters do not contain any redueced limit when resuming a 0-RTT connection.
// It is only used on the client side.
func (p *TransportParameters) ValidForUpdate(saved *TransportParameters) bool {
return p.ActiveConnectionIDLimit >= saved.ActiveConnectionIDLimit &&
p.InitialMaxData >= saved.InitialMaxData &&
Expand Down

0 comments on commit a3c40a1

Please sign in to comment.