1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-10-01 03:36:26 -04:00

win32: avoid the segfault introduced by previous commit

This commit is contained in:
Witold Filipczyk 2006-05-21 15:18:33 +02:00 committed by Witold Filipczyk
parent 5558284c08
commit f2a2c69ccc

View File

@ -590,12 +590,14 @@ select_one_loop(int num_fds, struct fd_set *rd, struct fd_set *wr,
errno = WSAGetLastError();
}
sel_rc = select(fd + 1, NULL, &sock_wr, NULL, &tv);
if (sel_rc > 0) {
FD_SET (fd, wr);
rc++;
} else if (sel_rc < 0) {
errno = WSAGetLastError();
if (wr) {
sel_rc = select(fd + 1, NULL, &sock_wr, NULL, &tv);
if (sel_rc > 0) {
FD_SET (fd, wr);
rc++;
} else if (sel_rc < 0) {
errno = WSAGetLastError();
}
}
sel_rc = select(fd + 1, NULL, NULL, &sock_ex, &tv);