Skip to content

Commit

Permalink
[C++] Fixed connection read error logging (apache#12492)
Browse files Browse the repository at this point in the history
(cherry picked from commit 6edcaa7)
  • Loading branch information
merlimat authored and codelipenghui committed Dec 20, 2021
1 parent b892196 commit d07491b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pulsar-client-cpp/lib/ClientConnection.cc
Original file line number Diff line number Diff line change
Expand Up @@ -577,9 +577,9 @@ void ClientConnection::handleRead(const boost::system::error_code& err, size_t b
if (err || bytesTransferred == 0) {
if (err) {
if (err == boost::asio::error::operation_aborted) {
LOG_DEBUG(cnxString_ << "Read failed: " << err.message());
LOG_DEBUG(cnxString_ << "Read operation was canceled: " << err.message());
} else {
LOG_ERROR(cnxString_ << "Read operation was cancelled");
LOG_ERROR(cnxString_ << "Read operation failed: " << err.message());
}
} // else: bytesTransferred == 0, which means server has closed the connection
close();
Expand Down

0 comments on commit d07491b

Please sign in to comment.