Fixing logging of ping acks in Http2OutboundFrameLogger

Motivation:

The Http2OutboundFrameLogger logs all PING frames as not acks.

Modifications:

Changed the logger to correctly log PING acks.

Result:

PING acks are logged correctly.
This commit is contained in:
nmittler 2015-05-20 08:33:59 -07:00
parent 88b8558ec8
commit b034cf18f9

View File

@ -89,7 +89,11 @@ public class Http2OutboundFrameLogger implements Http2FrameWriter {
@Override
public ChannelFuture writePing(ChannelHandlerContext ctx, boolean ack,
ByteBuf data, ChannelPromise promise) {
logger.logPing(OUTBOUND, data);
if (ack) {
logger.logPingAck(OUTBOUND, data);
} else {
logger.logPing(OUTBOUND, data);
}
return writer.writePing(ctx, ack, data, promise);
}