提交 0cc1346a 编写于 作者: R Ryan Campbell

Computer.getNode() can return null, causing NPE and making jobs to appear to run forever

上级 815c42c4
......@@ -233,8 +233,11 @@ public class SlaveComputer extends Computer {
if (launcher instanceof ExecutorListener) {
((ExecutorListener)launcher).taskAccepted(executor, task);
}
if (getNode().getRetentionStrategy() instanceof ExecutorListener) {
((ExecutorListener)getNode().getRetentionStrategy()).taskAccepted(executor, task);
//getNode() can return null at indeterminate times when nodes go offline
Slave node = getNode();
if (node != null && node.getRetentionStrategy() instanceof ExecutorListener) {
((ExecutorListener)node.getRetentionStrategy()).taskAccepted(executor, task);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册