Skip to content

Commit

Permalink
Fixing logging of ping acks in Http2OutboundFrameLogger
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
nmittler committed May 20, 2015
1 parent 627831d commit 203ec13
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,11 @@ public ChannelFuture writeSettingsAck(ChannelHandlerContext ctx, ChannelPromise
@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);
}

Expand Down

0 comments on commit 203ec13

Please sign in to comment.