Showing
1 changed file
with
1 additions
and
1 deletions
@@ -200,7 +200,7 @@ public abstract class AbstractTransportService implements TransportService { | @@ -200,7 +200,7 @@ public abstract class AbstractTransportService implements TransportService { | ||
200 | @Override | 200 | @Override |
201 | public void deregisterSession(TransportProtos.SessionInfoProto sessionInfo) { | 201 | public void deregisterSession(TransportProtos.SessionInfoProto sessionInfo) { |
202 | SessionMetaData currentSession = sessions.get(toId(sessionInfo)); | 202 | SessionMetaData currentSession = sessions.get(toId(sessionInfo)); |
203 | - if (currentSession.hasScheduledFuture()) { | 203 | + if (currentSession != null && currentSession.hasScheduledFuture()) { |
204 | log.debug("Stopping scheduler to avoid resending response if request has been ack."); | 204 | log.debug("Stopping scheduler to avoid resending response if request has been ack."); |
205 | currentSession.getScheduledFuture().cancel(false); | 205 | currentSession.getScheduledFuture().cancel(false); |
206 | } | 206 | } |