[Opt3.0]解决司乘屏重连的问题

This commit is contained in:
chenfufeng
2023-02-28 10:35:20 +08:00
parent 93addfeeab
commit 404150e24a
2 changed files with 31 additions and 29 deletions

View File

@@ -748,27 +748,29 @@ class MoGoAutopilotControlProvider :
}
override fun connectSpecifiedServer(ip: String) {
NSDNettyManager.getInstance().connectSpecifiedServer(
ip,
NettyTcpServer.SERVER_PORT,
MoGoAiCloudClientConfig.getInstance().sn,
object : NettyClientListener<MogoProtocolMsg> {
override fun onMessageResponseClient(
msg: MogoProtocolMsg?,
sign: String?,
channel: Channel
) {
msgHandler.handleMsgFromServer(msg, channel)
}
ThreadUtils.getIoPool().submit {
NSDNettyManager.getInstance().connectSpecifiedServer(
ip,
NettyTcpServer.SERVER_PORT,
MoGoAiCloudClientConfig.getInstance().sn,
object : NettyClientListener<MogoProtocolMsg> {
override fun onMessageResponseClient(
msg: MogoProtocolMsg?,
sign: String?,
channel: Channel
) {
msgHandler.handleMsgFromServer(msg, channel)
}
override fun onClientStatusConnectChanged(
statusCode: Int,
sign: String?,
channel: Channel
) {
msgHandler.handleClientConnStatus(statusCode, sign, channel)
}
})
override fun onClientStatusConnectChanged(
statusCode: Int,
sign: String?,
channel: Channel
) {
msgHandler.handleClientConnStatus(statusCode, sign, channel)
}
})
}
}
/**