X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fyaz-socket-manager.cpp;h=536c5b6cf6f7c04e7c308f4eb9552911cdf601ba;hb=b51e13a9b732fe2ca93044776d5e990dbf2a4c0e;hp=5f0f7df22a05b5538b9dc237adcdbf52e3615ec7;hpb=966d1a0443071c2b75426d0214bfb9960c5c3fba;p=yazpp-moved-to-github.git diff --git a/src/yaz-socket-manager.cpp b/src/yaz-socket-manager.cpp index 5f0f7df..536c5b6 100644 --- a/src/yaz-socket-manager.cpp +++ b/src/yaz-socket-manager.cpp @@ -2,7 +2,7 @@ * Copyright (c) 1998-2001, Index Data. * See the file LICENSE for details. * - * $Id: yaz-socket-manager.cpp,v 1.17 2001-11-04 22:36:21 adam Exp $ + * $Id: yaz-socket-manager.cpp,v 1.19 2002-10-09 12:50:26 adam Exp $ */ #include #ifdef WIN32 @@ -16,7 +16,7 @@ #include #include -#include +#include Yaz_SocketManager::YazSocketEntry **Yaz_SocketManager::lookupObserver( IYazSocketObserver *observer) @@ -144,7 +144,7 @@ int Yaz_SocketManager::processEvent() timeout_this -= now - p->last_activity; else p->last_activity = now; - if (timeout_this < 1) + if (timeout_this < 1 || timeout_this > 2147483646) timeout_this = 1; if (!timeout || timeout_this < timeout) timeout = timeout_this; @@ -169,7 +169,10 @@ int Yaz_SocketManager::processEvent() no, timeout); while ((res = select(max + 1, &in, &out, &except, timeout ? &to : 0)) < 0) if (errno != EINTR) + { + yaz_log (LOG_LOG|LOG_WARN, "select"); return -1; + } now = time(0); for (p = m_observers; p; p = p->next) {