Catch exceptions when using AsyncioTelnetServer. Fixes #1321.

This commit is contained in:
grossmj
2018-04-16 15:30:06 +08:00
parent 025441f027
commit a12c5a95b0
6 changed files with 26 additions and 7 deletions

View File

@ -346,6 +346,7 @@ class BaseNode:
remaining_trial -= 1
yield from AsyncioTelnetServer.write_client_intro(writer, echo=True)
server = AsyncioTelnetServer(reader=reader, writer=writer, binary=True, echo=True)
# warning: this will raise OSError exception if there is a problem...
self._wrapper_telnet_server = yield from asyncio.start_server(server.run, self._manager.port_manager.console_host, self.console)
@property