Fixed session interval issue that caused crash

Fixed issue with session check intervals that would occasionally
run for a connection that had been closed and cause a NPE crash.