Fix python caching flags of old packets
This commit is contained in:
parent
f9cb346ab1
commit
7a367acef3
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue