修复mqtt 自注册可能失效问题
This commit is contained in:
parent
75e21ccab8
commit
c9fda0f30c
|
|
@ -241,7 +241,9 @@ class MqttServerDeviceGateway implements DeviceGateway, MonitorSupportDeviceGate
|
||||||
if (anotherSession == null) {
|
if (anotherSession == null) {
|
||||||
return registry
|
return registry
|
||||||
.getDevice(msg.getDeviceId())
|
.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());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue