Skip to content

Commit

Permalink
Correct the ordering of whenSent in doc snippet (#8884)
Browse files Browse the repository at this point in the history
Signed-off-by: Tim Quinn <[email protected]>
  • Loading branch information
tjquinno authored Jun 14, 2024
1 parent dc26d36 commit 1ded39a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,8 @@ public void routing(HttpRules rules) {

private void getDefaultMessageHandler(ServerRequest request, ServerResponse response) {
Timer.Sample timerSample = Timer.start(); // <3>
sendResponse(response, "Here are some cards ...");
response.whenSent(() -> timerSample.stop(cardTimer)); // <4>
sendResponse(response, "Here are some cards ...");
}

private void sendResponse(ServerResponse response, String msg) {
Expand Down

0 comments on commit 1ded39a

Please sign in to comment.