ISocketObserver *observer)
{
SocketEntry **se;
-
+
for (se = &m_observers; *se; se = &(*se)->next)
if ((*se)->observer == observer)
break;
void SocketManager::deleteObservers()
{
SocketEntry *se = m_observers;
-
+
while (se)
{
SocketEntry *se_next = se->next;
if (output_mask & yaz_poll_except)
mask |= SOCKET_OBSERVE_EXCEPT;
-
+
if (mask)
{
SocketEvent *event = new SocketEvent;
event->event = SOCKET_OBSERVE_TIMEOUT;
putEvent (event);
no_put_events++;
-
+
}
}
SocketEvent *event = getEvent();
if (timeout == -1 || timeout_this < timeout)
timeout = timeout_this;
p->timeout_this = timeout_this;
- yaz_log (m_log, "SocketManager::select timeout_this=%d",
+ yaz_log (m_log, "SocketManager::select timeout_this=%d",
p->timeout_this);
}
else
while ((res = yaz_poll(fds, no_fds, timeout, 0)) < 0 && pass < 10)
{
if (errno == EINTR)
- continue;
+ {
+ delete [] fds;
+ return 1;
+ }
yaz_log(YLOG_ERRNO|YLOG_WARN, "yaz_poll");
yaz_log(YLOG_WARN, "errno=%d timeout=%d", errno, timeout);
}