Преглед изворни кода

Fix handle missing err on quic sniff

世界 пре 3 година
родитељ
комит
e0cfc33fe2
1 измењених фајлова са 3 додато и 0 уклоњено
  1. 3 0
      common/sniff/quic.go

+ 3 - 0
common/sniff/quic.go

@@ -163,6 +163,9 @@ func QUICClientHello(ctx context.Context, packet []byte) (*adapter.InboundContex
 	}
 	decryptedReader := bytes.NewReader(decrypted)
 	frameType, err := decryptedReader.ReadByte()
+	if err != nil {
+		return nil, err
+	}
 	if frameType != 0x6 {
 		// not crypto frame
 		return &adapter.InboundContext{Protocol: C.ProtocolQUIC}, nil