]> git.pond.sub.org Git - empserver/commitdiff
Generation numbers didn't catch all potential yields on output
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 21 Feb 2010 17:44:16 +0000 (18:44 +0100)
committerMarkus Armbruster <armbru@pond.sub.org>
Wed, 10 Mar 2010 08:44:22 +0000 (09:44 +0100)
io_output_if_queue_long() called ef_make_stale() only for long queues.
Missed in commit 2fa5f652, v4.3.24.
(cherry picked from commit a38c47a22c63b0e31874138548e45b58bfb636bf)

src/lib/empthread/io.c

index 5f320259725d0a83d3cd11098bc6e0b4282f31db..67c605206cf9592cab798a638fc88e5f59551e20 100644 (file)
@@ -250,8 +250,11 @@ io_output_if_queue_long(struct iop *iop, int wait)
 
     if (CANT_HAPPEN(iop->last_out > len))
        iop->last_out = 0;
-    if (len - iop->last_out < iop->bufsize)
+    if (len - iop->last_out < iop->bufsize) {
+       if (wait)
+           ef_make_stale();
        return 0;
+    }
     return io_output(iop, wait);
 }