fix length byte

This commit is contained in:
Eric House 2017-10-22 21:29:16 -07:00
parent 4583b5d88d
commit 6787fe1406

View file

@ -46,9 +46,9 @@ def query(req, ids):
sock.settimeout(5) # seconds
sock.connect(('127.0.0.1', 10998))
lenShort = 2 + idsLen + len(ids) + 1
lenShort = 2 + idsLen + len(ids) + 2
print(lenShort, PROTOCOL_VERSION, PRX_GET_MSGS, len(ids))
header = struct.Struct("!hBBh")
header = struct.Struct('!hBBh')
assert header.size == 6
sock.send(header.pack(lenShort, PROTOCOL_VERSION, PRX_GET_MSGS, len(ids)))