X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Feventl.c;h=a34e76a7c210211c6f458ca90b03cbe61392e7df;hb=770b156ad12cf75c816cdbe7f935493b812d6b5c;hp=8c7d3abbbc76f576b68d4850f5ed7fab615efeed;hpb=d16f37add45152d0d3b786a4676577a57e4f4139;p=yaz-moved-to-github.git diff --git a/src/eventl.c b/src/eventl.c index 8c7d3ab..a34e76a 100644 --- a/src/eventl.c +++ b/src/eventl.c @@ -117,8 +117,9 @@ int iochan_event_loop(IOCHAN *iochans) w = p->max_idle; else w = ftime - now; + /* tv_sec will be minimum wait.. */ if (w < tv_sec) - tv_sec = w; + tv_sec = (int) w; /* can hold it because w < tv_sec */ } fds[i].fd = p->fd; fds[i].input_mask = input_mask; @@ -138,15 +139,9 @@ int iochan_event_loop(IOCHAN *iochans) } else { - /* Destroy the first member in the chain, and try again */ - association *assoc = (association *)iochan_getdata(*iochans); - COMSTACK conn = assoc->client_link; - - cs_close(conn); - destroy_association(assoc); - iochan_destroy(*iochans); - yaz_log(log_level, "error select, destroying iochan %p", - *iochans); + yaz_log(YLOG_WARN|YLOG_ERRNO, "yaz_poll"); + xfree(fds); + continue; } } now = time(0);