diff -rN -up old-libjingle/talk/base/physicalsocketserver.cc new-libjingle/talk/base/physicalsocketserver.cc --- old-libjingle/talk/base/physicalsocketserver.cc 2007-05-01 17:02:49.000000000 +0100 +++ new-libjingle/talk/base/physicalsocketserver.cc 2007-05-01 17:02:49.000000000 +0100 @@ -885,6 +885,8 @@ bool PhysicalSocketServer::Wait(int cmsW if (!process_io && (pdispatcher != signal_wakeup_)) continue; int fd = pdispatcher->GetDescriptor(); + if (fd == INVALID_SOCKET) + continue; if (fd > fdmax) fdmax = fd; uint32 ff = pdispatcher->GetRequestedEvents(); @@ -919,6 +921,8 @@ bool PhysicalSocketServer::Wait(int cmsW for (unsigned i = 0; i < dispatchers_.size(); i++) { Dispatcher *pdispatcher = dispatchers_[i]; int fd = pdispatcher->GetDescriptor(); + if (fd == INVALID_SOCKET) + continue; uint32 ff = 0; if (FD_ISSET(fd, &fdsRead)) { FD_CLR(fd, &fdsRead);