diff --git a/twnet_parser/packet.py b/twnet_parser/packet.py index b1dcdfd..0fc6a02 100644 --- a/twnet_parser/packet.py +++ b/twnet_parser/packet.py @@ -43,7 +43,7 @@ class PacketFlags6(PrettyPrint): class PacketHeader(PrettyPrint): def __init__( self, - flags: PacketFlags7 = PacketFlags7(), + flags: Optional[PacketFlags7] = None, ack: int = 0, token: bytes = b'\xff\xff\xff\xff', num_chunks: Optional[int] = None @@ -53,6 +53,8 @@ class PacketHeader(PrettyPrint): the messages it was given when the pack() method is called """ + if not flags: + flags = PacketFlags7() self.flags: PacketFlags7 = flags self.ack: int = ack % NET_MAX_SEQUENCE self.token: bytes = token