Length of data on compressed history

This commit is contained in:
Emily 2019-07-30 22:08:53 +02:00
parent 3d853e8fe9
commit 7a39c7e483

View File

@ -7,7 +7,6 @@ from time import time
from objects import glob from objects import glob
flights = {} flights = {}
#flight_data_cache = b""
clients = set() clients = set()
STRUCTS = { STRUCTS = {
@ -105,8 +104,9 @@ async def handle(ws, path):
await send_error(b"Flight not found") await send_error(b"Flight not found")
else: else:
data = flights[uuid].get_all() data = flights[uuid].get_all()
await cli.ws.send(struct.pack(b"<B%ds" % len(data), await cli.ws.send(struct.pack(b"<BI%ds" % len(data),
3, # packet_id 3, # packet_id
len(data),
data data
)) ))