* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "IOEngine.h"
+#include <errno.h>
#ifdef WIN32
#define _WIN32_WINNT 0x501
#include <windows.h>
#include <winsock2.h>
#else
-#include <errno.h>
#include <string.h>
#include <stdio.h>
#endif
#endif
}
else if(iofd->type == IOTYPE_SERVER || iofd->type == IOTYPE_CLIENT) {
+ if(iofd->state == IO_CLOSED)
+ continue;
if(iofd->fd > fds_size)
fds_size = iofd->fd;
FD_SET(iofd->fd, &read_fds);