lightning: don't receive too much data, workaround by reading byte by byte

This commit is contained in:
Janus 2018-03-15 17:58:54 +01:00
parent a10365e6de
commit 155f62f7d4

View File

@ -729,7 +729,7 @@ async def readJson(reader):
except ValueError:
if data != b"": print("parse failed, data has", data)
try:
data += await asyncio.wait_for(reader.read(2048), 1)
data += await asyncio.wait_for(reader.read(1), 1)
except TimeoutError:
continue