perf: 优化处理telnet协议资产端点的端口问题

This commit is contained in:
Bai
2023-11-16 11:12:38 +08:00
committed by Bryan
parent 1ef51563b5
commit d166b26252

View File

@@ -41,7 +41,7 @@ class Endpoint(JMSBaseModel):
protocol == Protocol.oracle:
port = db_port_manager.get_port_by_db(target_instance)
else:
if protocol == Protocol.sftp:
if protocol in [Protocol.sftp, Protocol.telnet]:
protocol = Protocol.ssh
port = getattr(self, f'{protocol}_port', 0)
return port