]> jfr.im git - irc/rqf/shadowircd.git/blobdiff - libcharybdis/kqueue.c
Various changes for libratbox.
[irc/rqf/shadowircd.git] / libcharybdis / kqueue.c
index 9f76b7cd6a99c949a90f5e3f4801de4afc916d9f..6b82554ebcd7cd43e195008cd40f79bbd7eb5173 100644 (file)
@@ -22,7 +22,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: kqueue.c 3229 2007-03-05 17:23:07Z nenolod $
+ *  $Id: kqueue.c 3358 2007-04-03 09:34:38Z nenolod $
  */
 
 #include "stdinc.h"
@@ -30,7 +30,7 @@
 
 #include "libcharybdis.h"
 
-#define KE_LENGTH MAX_CLIENTS
+#define KE_LENGTH 128
 
 /* jlemon goofed up and didn't add EV_SET until fbsd 4.3 */
 
@@ -247,6 +247,13 @@ comm_select(unsigned long delay)
                        /* XXX error == bad! -- adrian */
                        continue;       /* XXX! */
                }
+               if (F == NULL)
+               {
+                       /* XXX this is because of our "queueing" of
+                        * kqueue changes so we may get ones for fds
+                        * we have already closed? -- jilles */
+                       continue;
+               }
 
                switch (ke[i].filter)
                {