lightning: don't receive too much data, workaround by reading byte by byte
This commit is contained in:
@@ -729,7 +729,7 @@ async def readJson(reader):
|
|||||||
except ValueError:
|
except ValueError:
|
||||||
if data != b"": print("parse failed, data has", data)
|
if data != b"": print("parse failed, data has", data)
|
||||||
try:
|
try:
|
||||||
data += await asyncio.wait_for(reader.read(2048), 1)
|
data += await asyncio.wait_for(reader.read(1), 1)
|
||||||
except TimeoutError:
|
except TimeoutError:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user