Fix NPE in transport service.

This commit is contained in:
Igor Kulikov 2019-07-18 19:34:27 +03:00
parent fd1552a294
commit 4e71935d27

View File

@ -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);
}