Merge pull request #2998 from lucas-clemente/remove-unneeded-app-data-packets-check

remove unneeded check in receivedPacketHandler.IsPotentiallyDuplicate
This commit is contained in:
Marten Seemann
2021-01-15 17:03:43 +08:00
committed by GitHub

View File

@@ -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")
}