Skip to content

Commit

Permalink
Merge pull request #4431 from DataDog/glopes/openliberty-blocking-NPE
Browse files Browse the repository at this point in the history
Openliberty: fix NPE after blocking response
  • Loading branch information
cataphract authored Dec 15, 2022
2 parents 0df0e19 + 9bcc90c commit 35222be
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ public static class HandleRequestAdvice {
Flow.Action.RequestBlockingAction rba = span.getRequestBlockingAction();
if (rba != null) {
ServletBlockingHelper.commitBlockingResponse(request, (SRTServletResponse) resp, rba);
// prevent caching of the handler
req.setAttribute(
"javax.servlet.error.status_code", ((SRTServletResponse) resp).getStatusCode());
return true; // skip method body
}

Expand Down

0 comments on commit 35222be

Please sign in to comment.