Browse Source

Fix NPE in transport service.

pull/1876/head
Igor Kulikov 7 years ago
parent
commit
4e71935d27
  1. 2
      common/transport/transport-api/src/main/java/org/thingsboard/server/common/transport/service/AbstractTransportService.java

2
common/transport/transport-api/src/main/java/org/thingsboard/server/common/transport/service/AbstractTransportService.java

@ -200,7 +200,7 @@ public abstract class AbstractTransportService implements TransportService {
@Override
public void deregisterSession(TransportProtos.SessionInfoProto sessionInfo) {
SessionMetaData currentSession = sessions.get(toId(sessionInfo));
if (currentSession.hasScheduledFuture()) {
if (currentSession != null && currentSession.hasScheduledFuture()) {
log.debug("Stopping scheduler to avoid resending response if request has been ack.");
currentSession.getScheduledFuture().cancel(false);
}

Loading…
Cancel
Save