From d16f36a1e36bdc4c8384165a82b5806e45d6d9b8 Mon Sep 17 00:00:00 2001 From: q191201771 <191201771@qq.com> Date: Thu, 18 Feb 2021 20:05:16 +0800 Subject: [PATCH] the pointer is always not nil, no need to check it --- packet_packer.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/packet_packer.go b/packet_packer.go index 231508c82..b1a2258f6 100644 --- a/packet_packer.go +++ b/packet_packer.go @@ -323,9 +323,6 @@ func (p *packetPacker) MaybePackAckPacket(handshakeConfirmed bool) (*packedPacke } encLevel = protocol.Encryption1RTT } - if ack == nil { - return nil, nil - } payload := &payload{ ack: ack, length: ack.Length(p.version),