You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2020/03/17 04:32:54 UTC
[GitHub] [incubator-doris] imay commented on a change in pull request #3128:
[Thrift] Fix a bug when ThriftClientImpl close() error
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:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org