fixed double sending rpc and timeout for lwm2m
This commit is contained in:
parent
820b4d7e58
commit
672f93c405
@ -619,7 +619,7 @@ class DeviceActorMessageProcessor extends AbstractContextAwareMsgProcessor {
|
|||||||
if (md.getMsg().getMsg().isPersisted()) {
|
if (md.getMsg().getMsg().isPersisted()) {
|
||||||
systemContext.getTbRpcService().save(tenantId, new RpcId(rpcId), status, null);
|
systemContext.getTbRpcService().save(tenantId, new RpcId(rpcId), status, null);
|
||||||
}
|
}
|
||||||
if (status != RpcStatus.SENT) {
|
if (status != RpcStatus.SENT && !(status == RpcStatus.FAILED && md.isDelivered())) {
|
||||||
sendNextPendingRequest(context);
|
sendNextPendingRequest(context);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -67,7 +67,7 @@ public abstract class RpcDownlinkRequestCallbackProxy<R, T> implements DownlinkR
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(String params, Exception e) {
|
public void onError(String params, Exception e) {
|
||||||
if (e instanceof TimeoutException) {
|
if (e instanceof TimeoutException || e instanceof org.eclipse.leshan.core.request.exception.TimeoutException) {
|
||||||
transportService.process(client.getSession(), this.request, RpcStatus.TIMEOUT, TransportServiceCallback.EMPTY);
|
transportService.process(client.getSession(), this.request, RpcStatus.TIMEOUT, TransportServiceCallback.EMPTY);
|
||||||
} else if (!(e instanceof ClientSleepingException)) {
|
} else if (!(e instanceof ClientSleepingException)) {
|
||||||
sendRpcReplyOnError(e);
|
sendRpcReplyOnError(e);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user