Skip to content

Commit 28ce730

Browse files
authored
Handle nullptr on killJobRequest requestor (#128)
1 parent 3c163fa commit 28ce730

File tree

1 file changed

+9
-1
lines changed
  • mantis-control-plane/mantis-control-plane-server/src/main/java/io/mantisrx/master/jobcluster

1 file changed

+9
-1
lines changed

mantis-control-plane/mantis-control-plane-server/src/main/java/io/mantisrx/master/jobcluster/JobClusterActor.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1716,7 +1716,15 @@ public void onJobKillRequest(KillJobRequest req) {
17161716
jobInfo.get().jobActor.tell(req, getSelf());
17171717
} else {
17181718
logger.info("Job {} not found", req.jobId.getId() );
1719-
req.requestor.tell(new JobClusterManagerProto.KillJobResponse(req.requestId, CLIENT_ERROR_NOT_FOUND, JobState.Noop, "Job " + req.jobId + " not found", req.jobId, req.user), getSelf());
1719+
if (req.requestor != null) {
1720+
req.requestor.tell(
1721+
new JobClusterManagerProto.KillJobResponse(
1722+
req.requestId,
1723+
CLIENT_ERROR_NOT_FOUND,
1724+
JobState.Noop,
1725+
"Job " + req.jobId + " not found", req.jobId, req.user),
1726+
getSelf());
1727+
}
17201728
}
17211729
}
17221730

0 commit comments

Comments
 (0)