Skip to content

Commit 86d1d4d

Browse files
authored
Update KeepAliveHandler.java (Azure#43968)
Send the ping contents when responding to pong.
1 parent 0067522 commit 86d1d4d

File tree

1 file changed

+1
-1
lines changed
  • sdk/openai/azure-ai-openai-realtime/src/main/java/com/azure/ai/openai/realtime/implementation/websocket

1 file changed

+1
-1
lines changed

sdk/openai/azure-ai-openai-realtime/src/main/java/com/azure/ai/openai/realtime/implementation/websocket/KeepAliveHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception
3737
// Ping, reply Pong
3838
LOGGER.atVerbose().log(() -> "Received PingWebSocketFrame");
3939
LOGGER.atVerbose().log(() -> "Sending PongWebSocketFrame");
40-
ch.writeAndFlush(new PongWebSocketFrame());
40+
ch.writeAndFlush(new PongWebSocketFrame(frame.copy().content()));
4141
} else if (frame instanceof PongWebSocketFrame) {
4242
// Pong
4343
LOGGER.atVerbose().log(() -> "Received PongWebSocketFrame");

0 commit comments

Comments
 (0)