lordgamez commented on code in PR #1600:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1600#discussion_r1295846913
##########
libminifi/src/utils/net/TcpServer.cpp:
##########
@@ -33,28 +33,37 @@ asio::awaitable<void> TcpServer::doReceive() {
co_await utils::net::async_wait(1s);
continue;
}
+ std::error_code error;
+ auto remote_address =
socket.lowest_layer().remote_endpoint(error).address();
+ if (error)
+ logger_->log_debug("Error during fetching remote endpoint: %s",
error.message());
+ auto local_port = socket.lowest_layer().local_endpoint(error).port();
+ if (error)
+ logger_->log_debug("Error during fetching local endpoint: %s",
error.message());
Review Comment:
Changed log level to warning in 2c9e2c57c8efdf232924c118dc091835c83cb99d,
it's not a blocking problem, if the endpoint cannot be retrieved it will only
be missing in an output attribute. If it causes a handshake failure in the SSL
case then it will fail anyway.
The error code is safe to reuse, asio will set it to success in the next
operation if it was set to a failure in the previous one.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]