From ac94633b75f69e326936ed33c5527b4eaee81bd4 Mon Sep 17 00:00:00 2001 From: Yuriy Kulikov <827794+yuriykulikov@users.noreply.github.com> Date: Wed, 4 May 2022 17:09:49 +0200 Subject: [PATCH] client: respond to KEEPALIVE(RESPOND) frame Client sends KEEPALIVE(EMPTY) in this case. This change is required for the rsocket-cpp client to be able to work with current rsocket-java and rsocket-kotlin servers, which do send KEEPALIVE(RESPOND) to the client. --- rsocket/statemachine/RSocketStateMachine.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/rsocket/statemachine/RSocketStateMachine.cpp b/rsocket/statemachine/RSocketStateMachine.cpp index 4d914052a..5a2a125ea 100644 --- a/rsocket/statemachine/RSocketStateMachine.cpp +++ b/rsocket/statemachine/RSocketStateMachine.cpp @@ -530,8 +530,7 @@ void RSocketStateMachine::onKeepAliveFrame( } } else { if (keepAliveRespond) { - closeWithError(Frame_ERROR::connectionError( - "client received keepalive with respond flag")); + sendKeepalive(FrameFlags::EMPTY_, std::move(data)); } else if (keepaliveTimer_) { keepaliveTimer_->keepaliveReceived(); }