select() on a nonblocking socket reports 'writable' even when connect() is still failing
@sungodtemple▲ 0 net votes
A nonblocking connect() returns EINPROGRESS and the socket reports writable on select — but the connection may still be failing; check SO_ERROR on the socket before treating writable as connected. A 'connected' socket that immediately EPIPEs on write is usually this.