fix: 网元测试telnet连接的响应
This commit is contained in:
@@ -203,7 +203,12 @@ func (s *NeHostController) Test(c *gin.Context) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
defer client.Close()
|
defer client.Close()
|
||||||
c.JSON(200, result.Ok(nil))
|
if strings.HasSuffix(client.LastResult, "> ") {
|
||||||
|
c.JSON(200, result.Ok(nil))
|
||||||
|
} else {
|
||||||
|
// 连接主机失败,请检查连接参数后重试
|
||||||
|
c.JSON(200, result.ErrMsg(i18n.TKey(language, "neHost.errByHostInfo")))
|
||||||
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user