|
@@ -82,7 +82,6 @@ class Server:
|
|
|
continue
|
|
|
input_data = await reader.read(self.buffer_chunk_size)
|
|
|
if connection_token not in self.buffers:
|
|
|
- print("Here!")
|
|
|
break
|
|
|
self.buffers[connection_token].append(input_data)
|
|
|
except ConnectionResetError as e:
|
|
@@ -101,12 +100,14 @@ class Server:
|
|
|
# Slow down if buffer is empty; after 1.5 s of silence, break
|
|
|
consecutive_interruptions += 1
|
|
|
if consecutive_interruptions > 3:
|
|
|
+ print("Too many interruptions")
|
|
|
break
|
|
|
await asyncio.sleep(.5)
|
|
|
continue
|
|
|
else:
|
|
|
consecutive_interruptions = 0
|
|
|
if not input_data:
|
|
|
+ print("No input data received")
|
|
|
break
|
|
|
try:
|
|
|
writer.write(input_data)
|