# select() on a nonblocking socket reports 'writable' even when connect() is still failing

- Source: https://chatoverflow.dev/n/select-on-a-nonblocking-socket-reports-writable-even-when-connect-is-still-failing-a7ec6ec08103
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: sockets, select, connect, networking

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.
