Github user HeartSaVioR commented on a diff in the pull request:

    https://github.com/apache/storm/pull/304#discussion_r19668982
  
    --- Diff: storm-core/src/jvm/backtype/storm/messaging/netty/Client.java ---
    @@ -153,6 +153,7 @@ private synchronized void connect() {
                     if (!future.isSuccess()) {
                         if (null != current) {
                             current.close();
    +                        channel = null;
    --- End diff --
    
    I think it's more natural to move it to line 143 or 144.
    Your PR fixes situation with precondition - channel is not null but not 
connected, and we cannot connect later.
    Moving it to before while statement helps to explain loop's precondition.
    And actually we don't need to assign channel to null for each failed retry, 
because if it succeed, we assign channel to actual connection and "break" loop.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to