--- libev/ev_select.c 2007/11/04 00:24:17 1.11 +++ libev/ev_select.c 2007/11/04 23:14:11 1.13 @@ -48,6 +48,9 @@ int offs = fd >> 3; int mask = 1 << (fd & 7); + if (oev == nev) + return; + if (vec_max < (fd >> 5) + 1) { int new_max = (fd >> 5) + 1; @@ -128,6 +131,22 @@ method_modify = select_modify; method_poll = select_poll; + vec_max = 0; + vec_ri = 0; + vec_ri = 0; + vec_wo = 0; + vec_wo = 0; + return EVMETHOD_SELECT; } +static void +select_destroy (EV_P) +{ + free (vec_ri); + free (vec_ro); + free (vec_wi); + free (vec_wo); +} + +