mirror of https://github.com/jumpserver/jumpserver
perf: 优化处理telnet协议资产端点的端口问题
parent
1ef51563b5
commit
d166b26252
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue