Copilot commented on code in PR #2084:
URL: https://github.com/apache/nifi-minifi-cpp/pull/2084#discussion_r2673220044


##########
extensions/standard-processors/processors/GetTCP.cpp:
##########
@@ -203,7 +204,10 @@ asio::awaitable<std::error_code> 
GetTCP::TcpClient::readLoop(auto& socket) {
       continue;
 
     if (!max_queue_size_ || max_queue_size_ > concurrent_queue_.size()) {
-      utils::net::Message message{read_message.substr(0, bytes_read), 
utils::net::IpProtocol::TCP, socket.lowest_layer().remote_endpoint().address(), 
socket.lowest_layer().remote_endpoint().port()};
+      const auto remote_endpoint = socket.lowest_layer().remote_endpoint();
+      const auto local_endpoint = socket.lowest_layer().remote_endpoint();

Review Comment:
   The local_endpoint is incorrectly assigned to remote_endpoint(). It should 
be assigned to local_endpoint() to correctly capture the local port information.
   ```suggestion
         const auto local_endpoint = socket.lowest_layer().local_endpoint();
   ```



-- 
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]

Reply via email to