Reset flags before returning from connect_nb

Signed-off-by: Lon Hohberger <lon@users.sourceforge.net>
This commit is contained in:
Lon Hohberger 2010-01-14 19:58:16 -05:00
parent 282b384c08
commit 2c4df2e500

View File

@ -44,7 +44,7 @@ connect_nb(int fd, struct sockaddr *dest, socklen_t len, int timeout)
return -1;
if (ret == 0)
return 0;
goto done;
FD_ZERO(&rfds);
FD_SET(fd, &rfds);
@ -75,6 +75,7 @@ connect_nb(int fd, struct sockaddr *dest, socklen_t len, int timeout)
return -1;
}
done:
fcntl(fd, F_SETFL, flags);
return 0;
}