reset parser before raising exception

This commit is contained in:
Gilles Boccon-Gibod
2025-03-19 11:32:51 -04:00
parent 5e55c0e358
commit 3495eb52ba

View File

@@ -139,6 +139,7 @@ class PacketParser:
packet_type
) or self.extended_packet_info.get(packet_type)
if self.packet_info is None:
self.reset()
raise core.InvalidPacketError(
f'invalid packet type {packet_type}'
)