ifplusor commented on code in PR #451:
URL: 
https://github.com/apache/rocketmq-client-cpp/pull/451#discussion_r1218995573


##########
src/transport/TcpRemotingClient.cpp:
##########
@@ -334,8 +333,9 @@ std::shared_ptr<TcpTransport> 
TcpRemotingClient::CreateTransport(const string& a
 
     //<!callback;
     TcpTransportReadCallback callback = needResponse ? 
&TcpRemotingClient::static_messageReceived : nullptr;
-
-    tts = TcpTransport::CreateTransport(this, m_enableSsl, m_sslPropertyFile, 
callback);
+    if(!tts) {
+      tts = TcpTransport::CreateTransport(this, m_enableSsl, 
m_sslPropertyFile, callback);
+    }
     TcpConnectStatus connectStatus = tts->connect(addr, 0);  // use non-block

Review Comment:
   and manage failure in the creating branch.



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