hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r437604 - /jakarta/httpcomponents/httpcore/trunk/module-nio/src/examples/org/apache/http/nio/examples/ElementalEchoServer.java
Date Mon, 28 Aug 2006 08:36:00 GMT
Author: olegk
Date: Mon Aug 28 01:35:59 2006
New Revision: 437604

URL: http://svn.apache.org/viewvc?rev=437604&view=rev
Log:
Bug fix in the echo server demo

Modified:
    jakarta/httpcomponents/httpcore/trunk/module-nio/src/examples/org/apache/http/nio/examples/ElementalEchoServer.java

Modified: jakarta/httpcomponents/httpcore/trunk/module-nio/src/examples/org/apache/http/nio/examples/ElementalEchoServer.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-nio/src/examples/org/apache/http/nio/examples/ElementalEchoServer.java?rev=437604&r1=437603&r2=437604&view=diff
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-nio/src/examples/org/apache/http/nio/examples/ElementalEchoServer.java
(original)
+++ jakarta/httpcomponents/httpcore/trunk/module-nio/src/examples/org/apache/http/nio/examples/ElementalEchoServer.java
Mon Aug 28 01:35:59 2006
@@ -45,6 +45,9 @@
                     session.setEventMask(EventMask.READ_WRITE);
                 }
                 System.out.println("Bytes read: " + bytesRead);
+                if (bytesRead == -1) {
+                    session.close();
+                }
             } catch (IOException ex) {
                 System.err.println("I/O error: " + ex.getMessage());
             }



Mime
View raw message