]> git.pond.sub.org Git - empserver/blobdiff - src/lib/empthread/io.c
Generation numbers didn't catch all potential yields on output
[empserver] / 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);
 }