Browse Source

attempt to prevent future endless loops in io_wait half-closed fd

cleanup
master
Felix von Leitner 8 months ago
parent
commit
5420136c6b
  1. 4
      io/io_canread.c
  2. 4
      io/io_canwrite.c

4
io/io_canread.c

@ -51,9 +51,7 @@ int64 io_canread() {
if (e->closed) {
/* The fd was previously closed, but there were still open events on it.
* To prevent race conditions, we did not actually close the fd
* but only marked it as closed, so we can skip this event here
* and really closed it now. */
io_close(r);
* but only marked it as closed, so we can skip this event here */
continue;
}

4
io/io_canwrite.c

@ -46,9 +46,7 @@ int64 io_canwrite() {
if (e->closed) {
/* The fd was previously closed, but there were still open events on it.
* To prevent race conditions, we did not actually close the fd
* but only marked it as closed, so we can skip this event here
* and really closed it now. */
io_close(r);
* but only marked it as closed, so we can skip this event here */
continue;
}

Loading…
Cancel
Save