From 1f1fcd30e0551591c1235fd397b741c0c6dd58a4 Mon Sep 17 00:00:00 2001 From: zhangzhiyong Date: Sat, 9 Nov 2024 14:21:21 +0800 Subject: [PATCH 1/2] =?UTF-8?q?[fix]=20mesh=20remote=20=E9=97=AE=E9=A2=98?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jcommon/pom.xml | 37 ++++++++++--------- .../com/xiaomi/data/push/common/NetUtils.java | 8 ++-- 2 files changed, 23 insertions(+), 22 deletions(-) diff --git a/jcommon/pom.xml b/jcommon/pom.xml index 7b53cedbe..d4ecf9813 100644 --- a/jcommon/pom.xml +++ b/jcommon/pom.xml @@ -250,24 +250,25 @@ - - org.apache.maven.plugins - maven-gpg-plugin - 1.6 - - - sign-artifacts - verify - - sign - - - gpg - - - - - + + + + + + + + + + + + + + + + + + + diff --git a/jcommon/rcurve/src/main/java/com/xiaomi/data/push/common/NetUtils.java b/jcommon/rcurve/src/main/java/com/xiaomi/data/push/common/NetUtils.java index d0a289181..f5111615e 100644 --- a/jcommon/rcurve/src/main/java/com/xiaomi/data/push/common/NetUtils.java +++ b/jcommon/rcurve/src/main/java/com/xiaomi/data/push/common/NetUtils.java @@ -13,10 +13,10 @@ */ public class NetUtils { - public static EventLoopGroup getEventLoopGroup() { -// if (CommonUtils.isMac() && CommonUtils.isArch64()) { -// return new NioEventLoopGroup(); -// } + public static EventLoopGroup getEventLoopGroup(boolean remote) { + if (remote) { + return new NioEventLoopGroup(); + } if (CommonUtils.isWindows()) { return new NioEventLoopGroup(); } From b7409fcc792cc358eabc62c36c98c4e90264f414 Mon Sep 17 00:00:00 2001 From: zhangzhiyong Date: Sat, 9 Nov 2024 14:29:16 +0800 Subject: [PATCH 2/2] =?UTF-8?q?[fix]=20mesh=20remote=20=E9=97=AE=E9=A2=98?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/xiaomi/data/push/uds/UdsClient.java | 2 +- .../src/main/java/com/xiaomi/data/push/uds/UdsServer.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/jcommon/rcurve/src/main/java/com/xiaomi/data/push/uds/UdsClient.java b/jcommon/rcurve/src/main/java/com/xiaomi/data/push/uds/UdsClient.java index 33f0d6780..eccf675c1 100644 --- a/jcommon/rcurve/src/main/java/com/xiaomi/data/push/uds/UdsClient.java +++ b/jcommon/rcurve/src/main/java/com/xiaomi/data/push/uds/UdsClient.java @@ -95,7 +95,7 @@ public UdsClient(String id) { private EventLoopGroup getEventLoopGroup() { - return NetUtils.getEventLoopGroup(); + return NetUtils.getEventLoopGroup(this.remote); } diff --git a/jcommon/rcurve/src/main/java/com/xiaomi/data/push/uds/UdsServer.java b/jcommon/rcurve/src/main/java/com/xiaomi/data/push/uds/UdsServer.java index b41ab9031..07a63f225 100644 --- a/jcommon/rcurve/src/main/java/com/xiaomi/data/push/uds/UdsServer.java +++ b/jcommon/rcurve/src/main/java/com/xiaomi/data/push/uds/UdsServer.java @@ -109,8 +109,8 @@ public void start(String path) { this.path = path; delPath(); boolean mac = CommonUtils.isMac(); - EventLoopGroup bossGroup = NetUtils.getEventLoopGroup(); - EventLoopGroup workerGroup = NetUtils.getEventLoopGroup(); + EventLoopGroup bossGroup = NetUtils.getEventLoopGroup(this.remote); + EventLoopGroup workerGroup = NetUtils.getEventLoopGroup(this.remote); try { ServerBootstrap b = new ServerBootstrap(); b.group(bossGroup, workerGroup)