From c5b610f6a50e1c50d89edb85e133508c1f52c48f Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Mon, 11 Jan 2021 16:56:34 +0800 Subject: [PATCH] remove unneeded check in receivedPacketHandler.IsPotentiallyDuplicate The application data packet number space is never dropped. --- internal/ackhandler/received_packet_handler.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/internal/ackhandler/received_packet_handler.go b/internal/ackhandler/received_packet_handler.go index 1a5bdd891..89fb30d31 100644 --- a/internal/ackhandler/received_packet_handler.go +++ b/internal/ackhandler/received_packet_handler.go @@ -130,9 +130,7 @@ func (h *receivedPacketHandler) IsPotentiallyDuplicate(pn protocol.PacketNumber, return h.handshakePackets.IsPotentiallyDuplicate(pn) } case protocol.Encryption0RTT, protocol.Encryption1RTT: - if h.appDataPackets != nil { - return h.appDataPackets.IsPotentiallyDuplicate(pn) - } + return h.appDataPackets.IsPotentiallyDuplicate(pn) } panic("unexpected encryption level") }