Skip to content

Commit

Permalink
[C++] Reset havePendingPingRequest flag for any data received from …
Browse files Browse the repository at this point in the history
…broker (apache#17658)
  • Loading branch information
merlimat committed Sep 15, 2022
1 parent 5cc6eeb commit 55656b6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pulsar-client-cpp/lib/ClientConnection.cc
Original file line number Diff line number Diff line change
Expand Up @@ -810,6 +810,10 @@ void ClientConnection::handleIncomingCommand() {
}

case Ready: {
// Since we are receiving data from the connection, we are assuming that for now the connection is
// still working well.
havePendingPingRequest_ = false;

// Handle normal commands
switch (incomingCmd_.type()) {
case BaseCommand::SEND_RECEIPT: {
Expand Down Expand Up @@ -1165,7 +1169,6 @@ void ClientConnection::handleIncomingCommand() {

case BaseCommand::PONG: {
LOG_DEBUG(cnxString_ << "Received response to ping message");
havePendingPingRequest_ = false;
break;
}

Expand Down

0 comments on commit 55656b6

Please sign in to comment.