Fix NPE in HouseKeeper.stopScavenging (#4604)

* Fix NPE in HouseKeeper.stopScavenging

Signed-off-by: Hirotaka Ikoma <hikoma@gmail.com>
This commit is contained in:
Hirotaka Ikoma 2020-02-27 00:38:50 +09:00 committed by GitHub
parent 18f8752ad0
commit 65a22e5e80
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -158,8 +158,9 @@ public class HouseKeeper extends AbstractLifeCycle
LOG.info("{} Stopped scavenging", _sessionIdManager.getWorkerName()); LOG.info("{} Stopped scavenging", _sessionIdManager.getWorkerName());
} }
_task = null; _task = null;
if (_ownScheduler) if (_ownScheduler && _scheduler != null)
{ {
_ownScheduler = false;
_scheduler.stop(); _scheduler.stop();
_scheduler = null; _scheduler = null;
} }