]> 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 8016044d3e7060840bd784f3dec04360f5a9e384..67c605206cf9592cab798a638fc88e5f59551e20 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  Empire - A multi-player, client/server Internet based war game.
- *  Copyright (C) 1986-2009, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ *  Copyright (C) 1986-2010, Dave Pare, Jeff Bailey, Thomas Ruschak,
  *                           Ken Stevens, Steve McClure
  *
  *  This program is free software; you can redistribute it and/or modify
@@ -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);
 }