[Fix]解决局域网内多个pad注册同名service导致连接不上的问题

This commit is contained in:
chenfufeng
2022-04-14 16:46:37 +08:00
parent 357cc49845
commit 594f7f5f01
3 changed files with 14 additions and 14 deletions

View File

@@ -36,26 +36,26 @@ PASSWORD=xintai2018
RELEASE=true
# AI CLOUD 云平台
# 工具类
MOGO_UTILS_VERSION=1.3.51
MOGO_UTILS_VERSION=1.3.53
# 网络请求
MOGO_NETWORK_VERSION=1.3.51
MOGO_NETWORK_VERSION=1.3.53
# 网络DNS
MOGO_HTTPDNS_VERSION=1.3.51
MOGO_HTTPDNS_VERSION=1.3.53
# 鉴权
MOGO_PASSPORT_VERSION=1.3.51
MOGO_PASSPORT_VERSION=1.3.53
# 常链接
MOGO_SOCKET_VERSION=1.3.51
MOGO_SOCKET_VERSION=1.3.53
# 数据采集
MOGO_REALTIME_VERSION=1.3.51
MOGO_REALTIME_VERSION=1.3.53
# 探路,道路事件发布,获取
MOGO_TANLU_VERSION=1.3.51
MOGO_TANLU_VERSION=1.3.53
# 直播推流
MOGO_LIVE_VERSION=1.3.51
MOGO_LIVE_VERSION=1.3.53
# 直播拉流
MOGO_TRAFFICLIVE_VERSION=1.3.51
MOGO_TRAFFICLIVE_VERSION=1.3.53
# 定位服务
MOGO_LOCATION_VERSION=1.3.51
MOGO_LOCATION_VERSION=1.3.53
# 远程通讯模块
MOGO_TELEMATIC_VERSION=1.3.51
MOGO_TELEMATIC_VERSION=1.3.53
# v2x
MOGO_V2X_VERSION=1.3.51
MOGO_V2X_VERSION=1.3.53

View File

@@ -195,7 +195,7 @@ public class NSDNettyManager {
//获取到指定的地址进行Netty的连接
connectNettyServer(hostAddress, port, uuid, listener);
if (info.getServiceName().equals(SERVER_NAME)) {
if (info.getServiceName().startsWith(SERVER_NAME)) {
//扫描到以后停止
mNsdClient.stopServiceDiscovery();
}

View File

@@ -97,7 +97,7 @@ public class NsdClient {
public void onServiceFound(NsdServiceInfo serviceInfo) {
Logger.e(TAG, "onServiceFound()");
//根据咱服务器的定义名称,指定解析该 NsdServiceInfo
if (serviceInfo.getServiceName().equals(mServiceName)) {
if (serviceInfo.getServiceName().startsWith(mServiceName)) {
mNsdManager.resolveService(serviceInfo, getResolveListener());
} else {
mHandler.sendEmptyMessage(MSG_NULL);