]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
io_remove() fix
authorTimo Sirainen <tss@iki.fi>
Sat, 19 Jun 2004 20:06:55 +0000 (23:06 +0300)
committerTimo Sirainen <tss@iki.fi>
Sat, 19 Jun 2004 20:06:55 +0000 (23:06 +0300)
--HG--
branch : HEAD

src/lib/ioloop.c

index 5bf1f0ce814bd12dbda0d9dae8ed3081758a8293..c822579fc06d092cb065d7ab7a17dfc218f4b509 100644 (file)
@@ -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)