From: Timo Sirainen Date: Sat, 19 Jun 2004 20:06:55 +0000 (+0300) Subject: io_remove() fix X-Git-Tag: 1.1.alpha1~3928 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9f5c9ecc83c451f32c186d53da238996aa4d66fb;p=thirdparty%2Fdovecot%2Fcore.git io_remove() fix --HG-- branch : HEAD --- diff --git a/src/lib/ioloop.c b/src/lib/ioloop.c index 5bf1f0ce81..c822579fc0 100644 --- a/src/lib/ioloop.c +++ b/src/lib/ioloop.c @@ -81,12 +81,12 @@ void io_remove(struct io *io) /* notify the real I/O handler */ io_loop_handle_remove(current_ioloop, io->fd, io->condition); + io->destroyed = TRUE; + io->fd = -1; + /* check if we removed the highest fd */ if (io->fd == current_ioloop->highest_fd) update_highest_fd(current_ioloop); - - io->destroyed = TRUE; - io->fd = -1; } void io_destroy(struct ioloop *ioloop, struct io **io_p)