This is an automated email from the ASF dual-hosted git repository.
mmerli pushed a commit to branch branch-2.9
in repository https://gitbox.apache.org/repos/asf/pulsar.git
The following commit(s) were added to refs/heads/branch-2.9 by this push:
new db6393aee84 [C++] Reset `havePendingPingRequest` flag for any data
received from broker (#17658)
db6393aee84 is described below
commit db6393aee84323ec42dbed6b6909935fbae5a81a
Author: Matteo Merli <[email protected]>
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 95d1bf83adc..69f61ca0de4 100644
--- a/pulsar-client-cpp/lib/ClientConnection.cc
+++ b/pulsar-client-cpp/lib/ClientConnection.cc
@@ -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: {
@@ -1165,7 +1169,6 @@ void ClientConnection::handleIncomingCommand() {
case BaseCommand::PONG: {
LOG_DEBUG(cnxString_ << "Received response to ping
message");
- havePendingPingRequest_ = false;
break;
}