Skip to content

Commit 64819bd

Browse files
committed
small bug found
1 parent 12af3e3 commit 64819bd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Backend/core/comms.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ def parse_packets(self, new_data: bytes, tmp_source: str):
264264

265265
# If the remaining data is longer than the expected packet length,
266266
# there might be an incomplete packet, so log a warning.
267-
if len(self.__tmp_data[tmp_source]) >= byte_length:
267+
if len(self.__tmp_data[tmp_source]) >= byte_length + len(header) + len(footer):
268268
print(f"Source: {tmp_source}: Warning: Incomplete or malformed packet ------------------------------------")
269269
self.__tmp_data[tmp_source] = b''
270270

0 commit comments

Comments
 (0)