version 1.129, 2008/02/26 19:15:05
|
version 1.130, 2008/02/27 20:21:17
|
|
|
#include <Pegasus/Common/Exception.h> | #include <Pegasus/Common/Exception.h> |
#include "ArrayIterator.h" | #include "ArrayIterator.h" |
#include "HostAddress.h" | #include "HostAddress.h" |
#include <errno.h> |
|
| |
PEGASUS_USING_STD; | PEGASUS_USING_STD; |
| |
|
|
#else | #else |
int events = select(maxSocketCurrentPass, &fdread, NULL, NULL, &tv); | int events = select(maxSocketCurrentPass, &fdread, NULL, NULL, &tv); |
#endif | #endif |
|
int selectErrno = getSocketError(); |
|
|
_entriesMutex.lock(); | _entriesMutex.lock(); |
| |
struct timeval timeNow; | struct timeval timeNow; |
|
|
if (events == PEGASUS_SOCKET_ERROR) | if (events == PEGASUS_SOCKET_ERROR) |
{ | { |
PEG_TRACE((TRC_HTTP, Tracer::LEVEL4, | PEG_TRACE((TRC_HTTP, Tracer::LEVEL4, |
"Monitor::run - errorno = %d has occurred on select.", errno)); |
"Monitor::run - select() returned error %d.", selectErrno)); |
// The EBADF error indicates that one or more or the file | // The EBADF error indicates that one or more or the file |
// descriptions was not valid. This could indicate that | // descriptions was not valid. This could indicate that |
// the entries structure has been corrupted or that | // the entries structure has been corrupted or that |
// we have a synchronization error. | // we have a synchronization error. |
| |
PEGASUS_ASSERT(errno != EBADF); |
PEGASUS_ASSERT(selectErrno != EBADF); |
} | } |
else if (events) | else if (events) |
{ | { |