Skip to content

Commit

Permalink
fix: build
Browse files Browse the repository at this point in the history
(cherry picked from commit bb2e536)
  • Loading branch information
tobyxdd committed May 20, 2024
1 parent 664a4ca commit 706b287
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 12 deletions.
4 changes: 2 additions & 2 deletions congestion/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ type (

// Expose some constants from protocol that congestion control algorithms may need.
const (
InitialPacketSizeIPv4 = protocol.InitialPacketSizeIPv4
InitialPacketSizeIPv6 = protocol.InitialPacketSizeIPv6
InitialPacketSizeIPv4 = protocol.InitialPacketSize
InitialPacketSizeIPv6 = protocol.InitialPacketSize
MinPacingDelay = protocol.MinPacingDelay
MaxPacketBufferSize = protocol.MaxPacketBufferSize
MinInitialPacketSize = protocol.MinInitialPacketSize
Expand Down
14 changes: 6 additions & 8 deletions http3/conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,15 +212,13 @@ func (c *connection) HandleUnidirectionalStreams(hijack func(StreamType, quic.Co
c.Connection.CloseWithError(quic.ApplicationErrorCode(ErrCodeSettingsError), "missing QUIC Datagram support")
return
}
if c.enableDatagrams {
go func() {
if err := c.receiveDatagrams(); err != nil {
if c.logger != nil {
c.logger.Debug("receiving datagrams failed", "error", err)
}
go func() {
if err := c.receiveDatagrams(); err != nil {
if c.logger != nil {
c.logger.Debug("receiving datagrams failed", "error", err)
}
}()
}
}
}()
}(str)
}
}
Expand Down
4 changes: 2 additions & 2 deletions integrationtests/self/mtu_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,14 +112,14 @@ var _ = Describe("DPLPMTUD", func() {
}()
err = conn.SendDatagram(make([]byte, 2000))
Expect(err).To(BeAssignableToTypeOf(&quic.DatagramTooLargeError{}))
initialMaxDatagramSize := err.(*quic.DatagramTooLargeError).MaxDatagramPayloadSize
initialMaxDatagramSize := err.(*quic.DatagramTooLargeError).MaxDataLen
_, err = str.Write(PRDataLong)
Expect(err).ToNot(HaveOccurred())
str.Close()
Eventually(done, 20*time.Second).Should(BeClosed())
err = conn.SendDatagram(make([]byte, 2000))
Expect(err).To(BeAssignableToTypeOf(&quic.DatagramTooLargeError{}))
finalMaxDatagramSize := err.(*quic.DatagramTooLargeError).MaxDatagramPayloadSize
finalMaxDatagramSize := err.(*quic.DatagramTooLargeError).MaxDataLen

mx.Lock()
defer mx.Unlock()
Expand Down

0 comments on commit 706b287

Please sign in to comment.