Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,9 @@ public void success(TaskInfo newValue)
errorTracker.requestSucceeded();
updateTaskInfo(newValue);
}
finally {
cleanupRequest();
}
}

@Override
Expand All @@ -320,6 +323,9 @@ public void failed(Throwable cause)
onFail.accept(e);
}
}
finally {
cleanupRequest();
}
}

@Override
Expand All @@ -328,6 +334,17 @@ public void fatal(Throwable cause)
try (SetThreadName ignored = new SetThreadName("TaskInfoFetcher-%s", taskId)) {
onFail.accept(cause);
}
finally {
cleanupRequest();
}
}
}

private synchronized void cleanupRequest()
{
if (future != null && future.isDone()) {
// remove outstanding reference to JSON response
future = null;
}
}

Expand Down