This is an automated email from the ASF dual-hosted git repository. mmerli pushed a commit to branch branch-2.11 in repository https://gitbox.apache.org/repos/asf/pulsar.git
The following commit(s) were added to refs/heads/branch-2.11 by this push: new eb6efa0464d [C++] Reset `havePendingPingRequest` flag for any data received from broker (#17658) eb6efa0464d is described below commit eb6efa0464d4e9536035cc9860fc96da626801da Author: Matteo Merli <mme...@apache.org> AuthorDate: Wed Sep 14 20:33:10 2022 -0700 [C++] Reset `havePendingPingRequest` flag for any data received from broker (#17658) --- pulsar-client-cpp/lib/ClientConnection.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pulsar-client-cpp/lib/ClientConnection.cc b/pulsar-client-cpp/lib/ClientConnection.cc index 45733248c1e..162c148a8dc 100644 --- a/pulsar-client-cpp/lib/ClientConnection.cc +++ b/pulsar-client-cpp/lib/ClientConnection.cc @@ -817,6 +817,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: { @@ -1175,7 +1179,6 @@ void ClientConnection::handleIncomingCommand() { case BaseCommand::PONG: { LOG_DEBUG(cnxString_ << "Received response to ping message"); - havePendingPingRequest_ = false; break; }