Skip to content
Snippets Groups Projects
Commit 7685c9d7 authored by rswindell's avatar rswindell
Browse files

Bug-fix: Socket.connect() would return true (success) even though a

TCP connection actually failed. This bug only appeared to affect *nix
systems. This bug appears to be very old, introduced in rev 1.74 of
this file (Mar-2003) by yours truly.
From the Linux 'connect' man page:
EINPROGRESS
              The  socket  is  nonblocking  and the connection cannot be i
              completed immediately.  It is possible to select(2) or poll(2)
              for completion by selecting the socket for writing.  After
              select(2) indicates writability, use getsockopt(2) to read the
              SO_ERROR option at level SOL_SOCKET to determine whether
              connect() completed successfully (SO_ERROR is zero) or
              unsuccessfully (SO_ERROR is one of the usual error codes listed
              here, explaining the reason for the failure).

We weren't doing the 'getsockopt(SO_ERROR)' part.
parent 8d649b6c
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment