about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ngircd/io.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ngircd/io.c b/src/ngircd/io.c
index 2c887bd0..d40b4850 100644
--- a/src/ngircd/io.c
+++ b/src/ngircd/io.c
@@ -12,7 +12,7 @@
 
 #include "portab.h"
 
-static char UNUSED id[] = "$Id: io.c,v 1.27 2007/12/27 18:25:26 fw Exp $";
+static char UNUSED id[] = "$Id: io.c,v 1.28 2008/01/02 10:29:51 fw Exp $";
 
 #include <assert.h>
 #include <stdlib.h>
@@ -635,6 +635,9 @@ io_event_del(int fd, short what)
 #endif
 	if (!i) return false;
 
+	if (!(i->what & what)) /* event is already disabled */
+		return true;
+
 	i->what &= ~what;
 
 #ifdef IO_USE_DEVPOLL