{
if (*mp)
{
+ IOCHAN c;
if ((*mp)->sel_thread)
sel_thread_destroy((*mp)->sel_thread);
+
+ c = (*mp)->channel_list;
+ while (c)
+ {
+ IOCHAN c_next = c->next;
+ xfree(c);
+ c = c_next;
+ }
xfree(*mp);
*mp = 0;
}
FD_ZERO(&out);
FD_ZERO(&except);
timeout = &to; /* hang on select */
- to.tv_sec = 15;
+ to.tv_sec = 300;
to.tv_usec = 0;
max = 0;
for (p = *iochans; p; p = p->next)
p->flags = (*p->maskfun)(p);
if (p->socketfun)
p->fd = (*p->socketfun)(p);
+ if (p->max_idle && p->max_idle < to.tv_sec)
+ to.tv_sec = p->max_idle;
if (p->fd < 0)
continue;
if (p->force_event)
FD_SET(p->fd, &except);
if (p->fd > max)
max = p->fd;
- if (p->max_idle && p->max_idle < to.tv_sec)
- to.tv_sec = p->max_idle;
}
if (man->sel_fd != -1)
{
{
*nextp = p->next;
xfree(p);
- break;
}
- nextp = &p->next;
+ else
+ nextp = &p->next;
}
}
while (*iochans);