From 75fe9a620e8abf67a5dd18a5f92b9e92087d93c8 Mon Sep 17 00:00:00 2001 From: leitner Date: Tue, 16 Feb 2021 15:50:38 +0000 Subject: [PATCH] attempt to prevent future endless loops in io_wait half-closed fd cleanup --- io/io_canread.c | 4 +--- io/io_canwrite.c | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/io/io_canread.c b/io/io_canread.c index 81d609f..df9c449 100644 --- a/io/io_canread.c +++ b/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; } diff --git a/io/io_canwrite.c b/io/io_canwrite.c index 0006c46..c601f6a 100644 --- a/io/io_canwrite.c +++ b/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; }