]> git.pond.sub.org Git - empserver/commitdiff
Clean up bogus setting of IO_EOF in io_output()
authorMarkus Armbruster <armbru@pond.sub.org>
Wed, 22 Apr 2009 21:20:29 +0000 (23:20 +0200)
committerMarkus Armbruster <armbru@pond.sub.org>
Sun, 19 Jul 2009 18:11:52 +0000 (14:11 -0400)
Don't set IO_EOF when writev() returns zero.  I don't think this could
happen, but it's wrong anyway, because a short write should not stop
future reads.

src/lib/empthread/io.c

index 5a50043bd2b412fdea15f89cb44812a22c6a9c6d..ca9c3e25e18b85bef086e54632fb8943d92c3a1f 100644 (file)
@@ -232,15 +232,7 @@ io_output(struct iop *iop, int waitforoutput)
        return -1;
     }
 
-    /* If no bytes were written, something happened..  Like an EOF. */
-    if (cc == 0) {
-       iop->flags |= IO_EOF;
-       return 0;
-    }
-
-    /* Remove the number of written bytes from the queue. */
     ioq_dequeue(iop->output, cc);
-
     return cc;
 }