From 28ce73087dfb98f802d5067d810a99b10808079e Mon Sep 17 00:00:00 2001 From: AndyZ <87735571+Andyz26@users.noreply.github.com> Date: Wed, 10 Nov 2021 19:16:42 -0800 Subject: [PATCH] Handle nullptr on killJobRequest requestor (#128) --- .../io/mantisrx/master/jobcluster/JobClusterActor.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/mantis-control-plane/mantis-control-plane-server/src/main/java/io/mantisrx/master/jobcluster/JobClusterActor.java b/mantis-control-plane/mantis-control-plane-server/src/main/java/io/mantisrx/master/jobcluster/JobClusterActor.java index 804c5081a..c5d9569f4 100644 --- a/mantis-control-plane/mantis-control-plane-server/src/main/java/io/mantisrx/master/jobcluster/JobClusterActor.java +++ b/mantis-control-plane/mantis-control-plane-server/src/main/java/io/mantisrx/master/jobcluster/JobClusterActor.java @@ -1716,7 +1716,15 @@ public void onJobKillRequest(KillJobRequest req) { jobInfo.get().jobActor.tell(req, getSelf()); } else { logger.info("Job {} not found", req.jobId.getId() ); - req.requestor.tell(new JobClusterManagerProto.KillJobResponse(req.requestId, CLIENT_ERROR_NOT_FOUND, JobState.Noop, "Job " + req.jobId + " not found", req.jobId, req.user), getSelf()); + if (req.requestor != null) { + req.requestor.tell( + new JobClusterManagerProto.KillJobResponse( + req.requestId, + CLIENT_ERROR_NOT_FOUND, + JobState.Noop, + "Job " + req.jobId + " not found", req.jobId, req.user), + getSelf()); + } } }