Merge remote-tracking branch 'origin/master'

This commit is contained in:
zhouhao 2020-09-22 22:07:08 +08:00
commit ae818c5311
2 changed files with 11 additions and 1 deletions

View File

@ -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
run.sh Executable file
View File

@ -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