refactor: 优化
This commit is contained in:
parent
20f589999a
commit
dcdba73994
|
|
@ -133,8 +133,7 @@ public class MqttClientSession implements PersistentSession {
|
|||
|
||||
@Override
|
||||
public boolean isAlive() {
|
||||
return (clientTemp == null || clientTemp.isAlive()) &&
|
||||
(keepAliveTimeout <= 0 || System.currentTimeMillis() - lastPingTime < keepAliveTimeout);
|
||||
return keepAliveTimeout <= 0 || System.currentTimeMillis() - lastPingTime < keepAliveTimeout;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -235,6 +235,7 @@ public class DefaultDeviceDataManager implements DeviceDataManager {
|
|||
"/device/*/" + deviceId + "/message/property/read,write/reply")
|
||||
.broker()
|
||||
.local()
|
||||
.priority(Integer.MIN_VALUE)
|
||||
.build();
|
||||
|
||||
disposable = eventBus
|
||||
|
|
|
|||
Loading…
Reference in New Issue