From 706b287e8204a66b980d104ec8f7fc3e82c91ce3 Mon Sep 17 00:00:00 2001 From: Toby Date: Mon, 20 May 2024 14:52:22 -0700 Subject: [PATCH] fix: build (cherry picked from commit bb2e53664023e3067f9f2054b815014f877bd6a7) --- congestion/interface.go | 4 ++-- http3/conn.go | 14 ++++++-------- integrationtests/self/mtu_test.go | 4 ++-- 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/congestion/interface.go b/congestion/interface.go index 0f4ea169244..3e41a4de692 100644 --- a/congestion/interface.go +++ b/congestion/interface.go @@ -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 diff --git a/http3/conn.go b/http3/conn.go index e8cd4779c35..7ea4b292918 100644 --- a/http3/conn.go +++ b/http3/conn.go @@ -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) } } diff --git a/integrationtests/self/mtu_test.go b/integrationtests/self/mtu_test.go index 64de6ab1670..8eeaf83a6f3 100644 --- a/integrationtests/self/mtu_test.go +++ b/integrationtests/self/mtu_test.go @@ -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()