瀏覽代碼

Merge remote-tracking branch 'origin/master'

zhouhao 4 年之前
父節點
當前提交
ae818c5311

+ 3 - 1
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());
                         }
                     }
                 }

+ 8 - 0
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