You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@heron.apache.org by GitBox <gi...@apache.org> on 2018/04/18 06:32:33 UTC

[GitHub] nwangtw commented on a change in pull request #2847: Replace CHECK() with CHECK_*() so that when a check is failing, more …

nwangtw commented on a change in pull request #2847: Replace CHECK() with CHECK_*() so that when a check is failing, more …
URL: https://github.com/apache/incubator-heron/pull/2847#discussion_r182320947
 
 

 ##########
 File path: heron/common/src/cpp/network/baseconnection.cpp
 ##########
 @@ -56,9 +56,10 @@ BaseConnection::BaseConnection(ConnectionEndPoint* endpoint, ConnectionOptions*
 }
 
 BaseConnection::~BaseConnection() {
-  CHECK(mState == INIT || mState == DISCONNECTED);
-  bufferevent_free(buffer_);
+  CHECK(mState == INIT || mState == DISCONNECTED)
+      << "Deleting connection object while it is still connected";
   disableRateLimit();  // To free the config object
+  bufferevent_free(buffer_);
 
 Review comment:
   Yeah. It is an unrelated change and has been merged in a different PR.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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