imay commented on a change in pull request #3128: [Thrift] Fix a bug when 
ThriftClientImpl close() error
URL: https://github.com/apache/incubator-doris/pull/3128#discussion_r393439371
 
 

 ##########
 File path: be/src/util/thrift_client.cpp
 ##########
 @@ -65,12 +76,21 @@ Status ThriftClientImpl::open_with_retry(int num_tries, 
int wait_ms) {
     return status;
 }
 
-Status ThriftClientImpl::close() {
-    if (_transport->isOpen()) {
-        _transport->close();
+void ThriftClientImpl::close() {
+    try {
+        if (_transport.get() != NULL && _transport->isOpen()) 
_transport->close();
 
 Review comment:
   prefer nullptr.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to