mirror of
https://github.com/GNS3/gns3-server.git
synced 2025-01-18 23:43:48 +02:00
parent
6bc54b17c7
commit
ad6fb664a2
@ -148,11 +148,11 @@ class AsyncioTelnetServer:
|
|||||||
return_when=asyncio.FIRST_COMPLETED)
|
return_when=asyncio.FIRST_COMPLETED)
|
||||||
for coro in done:
|
for coro in done:
|
||||||
data = coro.result()
|
data = coro.result()
|
||||||
# Console is closed
|
|
||||||
if len(data) == 0:
|
|
||||||
raise ConnectionResetError()
|
|
||||||
|
|
||||||
if coro == network_read:
|
if coro == network_read:
|
||||||
|
if network_reader.at_eof():
|
||||||
|
raise ConnectionResetError()
|
||||||
|
|
||||||
network_read = asyncio.async(network_reader.read(READ_SIZE))
|
network_read = asyncio.async(network_reader.read(READ_SIZE))
|
||||||
|
|
||||||
if IAC in data:
|
if IAC in data:
|
||||||
@ -167,6 +167,9 @@ class AsyncioTelnetServer:
|
|||||||
self._writer.write(data)
|
self._writer.write(data)
|
||||||
yield from self._writer.drain()
|
yield from self._writer.drain()
|
||||||
elif coro == reader_read:
|
elif coro == reader_read:
|
||||||
|
if self._reader.at_eof():
|
||||||
|
raise ConnectionResetError()
|
||||||
|
|
||||||
reader_read = yield from self._get_reader(network_reader)
|
reader_read = yield from self._get_reader(network_reader)
|
||||||
|
|
||||||
# Replicate the output on all clients
|
# Replicate the output on all clients
|
||||||
|
Loading…
Reference in New Issue
Block a user