Skip to content

Commit

Permalink
fix: run processing request body async in order to prevent event thre…
Browse files Browse the repository at this point in the history
…ad blocking (#274)

Co-authored-by: Aliaksandr Stsiapanay <aliaksandr_stsiapanay@epam.com>
  • Loading branch information
astsiapanay and astsiapanay authored Mar 13, 2024
1 parent 49b0b76 commit e1f7ee4
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,10 @@ private void handleRateLimitSuccess(String deploymentId) {
proxy.getTokenStatsTracker().startSpan(context);

context.getRequest().body()
.onSuccess(this::handleRequestBody)
.onSuccess(body -> proxy.getVertx().executeBlocking(() -> {
handleRequestBody(body);
return null;
}))
.onFailure(this::handleRequestBodyError);
}

Expand Down

0 comments on commit e1f7ee4

Please sign in to comment.