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