+
+ yaz_log (m_log, "putEvent I/O mask=%d", mask);
+ }
+ else if (
+ (p->timeout > 0 ||
+ (p->timeout == 0 && (p->mask & YAZ_SOCKET_OBSERVE_WRITE) == 0))
+ &&
+ (now - p->last_activity) >= p->timeout)
+ {
+ YazSocketEvent *event = new YazSocketEvent;
+ assert (p->last_activity);
+ yaz_log (m_log, "putEvent timeout, now = %ld last_activity=%ld timeout=%d",
+ now, p->last_activity, p->timeout);
+ p->last_activity = now;
+ event->observer = p->observer;
+ event->event = YAZ_SOCKET_OBSERVE_TIMEOUT;
+ putEvent (event);