From c9fda0f30cc24b49543524c08ee1d08752938d8c Mon Sep 17 00:00:00 2001 From: zhou-hao Date: Mon, 21 Sep 2020 17:11:47 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dmqtt=20=E8=87=AA=E6=B3=A8?= =?UTF-8?q?=E5=86=8C=E5=8F=AF=E8=83=BD=E5=A4=B1=E6=95=88=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../network/mqtt/gateway/device/MqttServerDeviceGateway.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/jetlinks-components/network-component/mqtt-component/src/main/java/org/jetlinks/community/network/mqtt/gateway/device/MqttServerDeviceGateway.java b/jetlinks-components/network-component/mqtt-component/src/main/java/org/jetlinks/community/network/mqtt/gateway/device/MqttServerDeviceGateway.java index 35682579..a618d11f 100644 --- a/jetlinks-components/network-component/mqtt-component/src/main/java/org/jetlinks/community/network/mqtt/gateway/device/MqttServerDeviceGateway.java +++ b/jetlinks-components/network-component/mqtt-component/src/main/java/org/jetlinks/community/network/mqtt/gateway/device/MqttServerDeviceGateway.java @@ -241,7 +241,9 @@ class MqttServerDeviceGateway implements DeviceGateway, MonitorSupportDeviceGate if (anotherSession == null) { return registry .getDevice(msg.getDeviceId()) - .flatMap(device -> handleMessage(device.getDeviceId(), device, msg, session)); + .map(device -> handleMessage(device.getDeviceId(), device, msg, session)) + .defaultIfEmpty(Mono.defer(()->handleMessage(msg.getDeviceId(), operator, msg, session))) + .flatMap(Function.identity()); } } } From d11eadfa98b93a290c98386a258af8bd7e636fc2 Mon Sep 17 00:00:00 2001 From: zhou-hao Date: Mon, 21 Sep 2020 17:12:03 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=90=AF=E5=8A=A8?= =?UTF-8?q?=E5=91=BD=E4=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- run.sh | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100755 run.sh diff --git a/run.sh b/run.sh new file mode 100755 index 00000000..dac8c111 --- /dev/null +++ b/run.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +./mvnw clean package -Dmaven.test.skip=true -Dmaven.build.timestamp="$(date "+%Y-%m-%d %H:%M:%S")" +if [ $? -ne 0 ];then + echo "构建失败!" +else + java -jar "$(pwd)/jetlinks-standalone/target/jetlinks-standalone.jar" +fi \ No newline at end of file