ivandasch commented on a change in pull request #9773:
URL: https://github.com/apache/ignite/pull/9773#discussion_r793416766



##########
File path: 
modules/platforms/cpp/network/os/linux/src/network/linux_async_client_pool.cpp
##########
@@ -112,7 +110,16 @@ namespace ignite
 
             bool closed = client.Get()->Close();
             if (closed)
+            {
+                IgniteError err0(client.Get()->GetCloseError());

Review comment:
       I meant that we can rewrite code
   ```
   if (!err)
                   {
                       const IgniteError& baseErr = 
client.Get()->GetCloseError();
                       std::auto_ptr<IgniteError> err0;
                       if (baseErr.GetCode() == IgniteError::IGNITE_SUCCESS)
                       {
                           err0 = std::auto_ptr<IgniteError>(new IgniteError(
                                   IgniteError::IGNITE_ERR_NETWORK_FAILURE, 
"Connection closed by server")
                           );
                       }
                       else
                           err0 = std::auto_ptr<IgniteError>(new 
IgniteError(baseErr));
   
                       HandleConnectionClosed(id, err0.get());
                   }
                   else
                       HandleConnectionClosed(id, err);
   ```
   But it is just thoughts, decision is up to you




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