Fixed some TransferOutput bugs.
authorFredrik Tolf <fredrik@dolda2000.com>
Sat, 5 Mar 2022 13:15:45 +0000 (14:15 +0100)
committerFredrik Tolf <fredrik@dolda2000.com>
Sat, 5 Mar 2022 13:15:45 +0000 (14:15 +0100)
src/jagi/scgi/EventServer.java

index 8218973..f617cf5 100644 (file)
@@ -117,9 +117,12 @@ public class EventServer implements Runnable {
            if(!eof && (buf.remaining() == 0)) {
                buf.clear();
                while(buf.remaining() > 0) {
-                   if(in.read(buf) < 0)
+                   if(in.read(buf) < 0) {
+                       eof = true;
                        break;
+                   }
                }
+               buf.flip();
            }
            double now = Driver.current().time();
            if((events & SelectionKey.OP_WRITE) != 0) {