Re: invalid argument in select() when peer socket is in FD_SET
--5vNYLRcllDrimb99
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
On 2011-Jul-31 16:20:08 +0200, "Christoph P.U. Kukulies" <kuku@kukulies.org=
> wrote:
> if (array_of_fds[i]) {
> nfds =3D max(nfds, array_of_fds[i]) + 1;
I suspect you mean: nfds =3D max(nfds, array_of_fds[i] + 1);
> FD_SET(array_of_fds[i], &readfds);
> }
--=20
Peter Jeremy
--5vNYLRcllDrimb99
Content-Type: application/pgp-signature
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (FreeBSD)
iEYEARECAAYFAk44YVgACgkQ/opHv/APuIeSSQCfaFbMJ00cnPB0zfRigo1pF9Sv
aJMAn0F+4zy5BeQ+v0Umji1iCz0B/ony
=HJUz
-----END PGP SIGNATURE-----
--5vNYLRcllDrimb99--
討論串 (同標題文章)
完整討論串 (本文為第 4 之 4 篇):