client port

This commit is contained in:
Devaev Maxim
2020-07-23 11:38:27 +03:00
parent 1d7f949b9e
commit ca3641c85b
3 changed files with 22 additions and 22 deletions

View File

@@ -32,7 +32,7 @@ from .errors import RfbConnectionError
# =====
def rfb_format_remote(writer: asyncio.StreamWriter) -> str:
return str(writer.transport.get_extra_info("peername")[0])
return "[%s]:%d" % (writer.transport.get_extra_info("peername")[:2])
async def rfb_close_writer(writer: asyncio.StreamWriter) -> bool: