Github user maoling commented on a diff in the pull request:
    --- Diff: 
src/java/main/org/apache/zookeeper/server/quorum/ ---
    @@ -647,11 +648,11 @@ public void run() {
                             numRetries = 0;
                     } catch (IOException e) {
    -                    if (shutdown) {
    -                        break;
    -                    }
                         LOG.error("Exception while listening", e);
    -                    numRetries++;
    +                    if (!(e instanceof SocketTimeoutException)) {
    +                        numRetries++;
    +                    }
    +                }finally {
    --- End diff --
    1. add a space between **}** and **finally**
    2. why we need to move some codes about closing **ServerSocket** in 
**catch** code block to **finally** code block? this will 
       make codes in **Line677-Line685** redundant
    3. If **numRetries** don't count **SocketTimeoutExceptions**.is this code 
facing an endless loop if SocketTimeoutExceptions always happen for a long 
time? this way of handling SocketTimeoutException is appropriate?

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 or file a JIRA ticket
with INFRA.

Reply via email to