You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by mm...@apache.org on 2022/09/15 17:23:29 UTC
[pulsar] branch branch-2.10 updated: [C++] Reset `havePendingPingRequest` flag for any data received from broker (#17658)
This is an automated email from the ASF dual-hosted git repository.
mmerli pushed a commit to branch branch-2.10
in repository https://gitbox.apache.org/repos/asf/pulsar.git
The following commit(s) were added to refs/heads/branch-2.10 by this push:
new 55656b642bc [C++] Reset `havePendingPingRequest` flag for any data received from broker (#17658)
55656b642bc is described below
commit 55656b642bca245de6271b39e714f31a0b3bb23f
Author: Matteo Merli <mm...@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 e6cab07cb9b..a7278e626b0 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;
}