THRIFT-2322 Correctly show the number of times ExecutorService (java) has rejected...
authorJens Geyer <jensg@apache.org>
Thu, 16 Jan 2014 20:36:08 +0000 (21:36 +0100)
committerJens Geyer <jensg@apache.org>
Thu, 16 Jan 2014 20:36:08 +0000 (21:36 +0100)
Patch: Rohit Agarwal & Jens Geyer

lib/java/src/org/apache/thrift/server/TThreadPoolServer.java

index 38dfd58..0a1763e 100644 (file)
@@ -117,13 +117,13 @@ public class TThreadPoolServer extends TServer {
 
     stopped_ = false;
     setServing(true);
-    while (!stopped_) {
-      int failureCount = 0;
+    int failureCount = 0;
+    while (!stopped_) {      
       try {
         TTransport client = serverTransport_.accept();
         WorkerProcess wp = new WorkerProcess(client);
+        int rejections = 0;
         while(true) {
-          int rejections = 0;
           try {
             executorService_.execute(wp);
             break;