diff --git a/connection.go b/connection.go index ec3a91bfe..583e9a90b 100644 --- a/connection.go +++ b/connection.go @@ -2029,6 +2029,7 @@ func (s *connection) sendPacketsWithGSO(now time.Time) error { return nil } + ecn = nextECN buf = getLargePacketBuffer() } } diff --git a/connection_test.go b/connection_test.go index b39f382eb..695fb7c61 100644 --- a/connection_test.go +++ b/connection_test.go @@ -2114,8 +2114,7 @@ func TestConnectionGSOBatchECN(t *testing.T) { done3 := make(chan struct{}) tc.sendConn.EXPECT().Write(expectedData, uint16(maxPacketSize), protocol.ECT1) - // TODO(#4829): check that the correct ECN marking is used - tc.sendConn.EXPECT().Write([]byte("foobar"), uint16(maxPacketSize), gomock.Any()).DoAndReturn( + tc.sendConn.EXPECT().Write([]byte("foobar"), uint16(maxPacketSize), protocol.ECNCE).DoAndReturn( func([]byte, uint16, protocol.ECN) error { close(done3); return nil }, )