From 73c4391a96e763bf814d518f5d2576847de27f7e Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Sat, 5 Jan 2019 16:16:58 +0700 Subject: [PATCH] don't log Initial packets in the packet handler map --- packet_handler_map.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packet_handler_map.go b/packet_handler_map.go index 6b511e58c..3c0f5bdd3 100644 --- a/packet_handler_map.go +++ b/packet_handler_map.go @@ -254,11 +254,11 @@ func (h *packetHandlerMap) handleParsedPackets(packets []*receivedPacket) { // TODO(#943): send a stateless reset h.logger.Debugf("received a short header packet with an unexpected connection ID %s", p.hdr.DestConnectionID) break // a short header packet is always the last in a coalesced packet - } - if h.server != nil { // no server set - h.server.handlePacket(p) + if h.server == nil { // no server set + h.logger.Debugf("received a packet with an unexpected connection ID %s", p.hdr.DestConnectionID) + continue } - h.logger.Debugf("received a packet with an unexpected connection ID %s", p.hdr.DestConnectionID) + h.server.handlePacket(p) } }