james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From matth...@apache.org
Subject svn commit: r1709373 - /james/project/trunk/mpt/core/src/main/java/org/apache/james/mpt/session/ExternalSession.java
Date Mon, 19 Oct 2015 07:33:28 GMT
Author: matthieu
Date: Mon Oct 19 07:33:27 2015
New Revision: 1709373

URL: http://svn.apache.org/viewvc?rev=1709373&view=rev
Log:
fixup! MPT-29 handle EOF in read retry

Modified:
    james/project/trunk/mpt/core/src/main/java/org/apache/james/mpt/session/ExternalSession.java

Modified: james/project/trunk/mpt/core/src/main/java/org/apache/james/mpt/session/ExternalSession.java
URL: http://svn.apache.org/viewvc/james/project/trunk/mpt/core/src/main/java/org/apache/james/mpt/session/ExternalSession.java?rev=1709373&r1=1709372&r2=1709373&view=diff
==============================================================================
--- james/project/trunk/mpt/core/src/main/java/org/apache/james/mpt/session/ExternalSession.java
(original)
+++ james/project/trunk/mpt/core/src/main/java/org/apache/james/mpt/session/ExternalSession.java
Mon Oct 19 07:33:27 2015
@@ -119,7 +119,7 @@ public final class ExternalSession imple
             result = tryReadFromSocket();
             // Reset for transfer into string buffer
             readBuffer.flip();
-            monitor.debug("[Done]");
+            monitor.debug(String.format("[Read %d characters]", readBuffer.limit()));
         }
         return result;
     }
@@ -137,7 +137,11 @@ public final class ExternalSession imple
                     return read != 0;
                 }
             });
-        return status.intValue() > 0;
+        if (status.intValue() == -1) {
+            monitor.debug("Error reading, got -1");
+            return false;
+        }
+        return true;
     }
 
     public void start() throws Exception {



---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message