Comment 1 for bug 1871478

Revision history for this message
Antoine "hashar" Musso (hashar) wrote :

Indeed this project hasn't been active in a while. I had some issue in the code running into an infinite loop while running with Java 11 while it works fine under Java 8. Maybe that is your case as well?

I have a made a fix that breaks the infinite loop and that seems to do the trick for Java 11:

 --- src/main/java/org/gearman/common/GearmanJobServerSession.java 2011-02-01 21:26:50 +0000
 +++ src/main/java/org/gearman/common/GearmanJobServerSession.java 2021-01-11 21:49:54 +0000
 @@ -198,7 +198,7 @@
          while (canRead()) {
              p = connection.read();
              if (p == null) {
 - continue;
 + break;
              }
              handleSessionEvent(new GearmanSessionEvent(p, this)); //NOPMD
          }

More details at https://phabricator.wikimedia.org/T271683#6737850