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

    https://github.com/apache/zookeeper/pull/336#discussion_r133885327
  
    --- Diff: 
src/java/main/org/apache/zookeeper/server/quorum/QuorumCnxManager.java ---
    @@ -647,11 +648,10 @@ public void run() {
                             numRetries = 0;
                         }
                     } catch (IOException e) {
    -                    if (shutdown) {
    -                        break;
    -                    }
                         LOG.error("Exception while listening", e);
    -                    numRetries++;
    +                    if (!(e instanceof SocketTimeoutException)) {
    --- End diff --
    
    - update
    
    - l checked the native method `java.net.PlainSocketImpl.socketAccept(Native 
Method)` in 
[openjdk](http://hg.openjdk.java.net/jdk8u/jdk8u/jdk/file/9d617cfd6717/src/solaris/native/java/net/PlainSocketImpl.c),
 **line709-721**, in which it changed from 0 to -1. and then timeout of -1 is 
interpreted as an infinite timeout.  In some cases, [-1 was interpreted as a 
larger positive integer](https://lwn.net/Articles/483078/). so this issue 
always happend after 49days. It's my wild conjecture.


---
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