Skip to content

Commit 6c6ba66

Browse files
committed
Ensure ordered logging of requests.
1 parent 311aafa commit 6c6ba66

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncHttpProvider.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -527,12 +527,18 @@ public boolean sendRequest(final FilterChainContext ctx,
527527
handler = new ExpectHandler(handler);
528528
}
529529
context.setBodyHandler(handler);
530+
if (LOGGER.isDebugEnabled()) {
531+
LOGGER.debug("REQUEST: {}", requestPacket);
532+
}
530533
isWriteComplete = handler.doHandle(ctx, request, requestPacket);
531534
} else {
532535
HttpContent content = HttpContent.builder(requestPacket).last(true).build();
536+
if (LOGGER.isDebugEnabled()) {
537+
LOGGER.debug("REQUEST: {}", requestPacket);
538+
}
533539
ctx.write(content, ctx.getTransportContext().getCompletionHandler());
534540
}
535-
LOGGER.debug("REQUEST: {}", requestPacket);
541+
536542

537543
return isWriteComplete;
538544
}

0 commit comments

Comments
 (0)