mirror of
https://github.com/GNS3/gns3-server.git
synced 2025-02-07 19:40:20 +00:00
Remotely close telnet console. Ref #2330
This commit is contained in:
parent
96a0b52cf8
commit
860ca3b35d
@ -215,6 +215,7 @@ class EthernetSwitch(Device):
|
|||||||
Deletes this Ethernet switch.
|
Deletes this Ethernet switch.
|
||||||
"""
|
"""
|
||||||
yield from self._telnet.close()
|
yield from self._telnet.close()
|
||||||
|
self._telnet_server.close()
|
||||||
|
|
||||||
for nio in self._nios.values():
|
for nio in self._nios.values():
|
||||||
if nio:
|
if nio:
|
||||||
|
@ -212,7 +212,8 @@ class AsyncioTelnetServer:
|
|||||||
@asyncio.coroutine
|
@asyncio.coroutine
|
||||||
def close(self):
|
def close(self):
|
||||||
for writer, connection in self._connections.items():
|
for writer, connection in self._connections.items():
|
||||||
connection.close()
|
writer.write_eof()
|
||||||
|
yield from writer.drain()
|
||||||
|
|
||||||
@asyncio.coroutine
|
@asyncio.coroutine
|
||||||
def client_connected_hook(self):
|
def client_connected_hook(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user