| Previous | Next |
| EHOSTUNREACH | EINPROGRESS |
EALREADY
A second operation arrived while the first is pending
EALREADY is a nonblocking state error. Solaris says an operation was attempted on a nonblocking object that already has an operation in progress. POSIX connect() specifically uses the errno when a connection request is already in progress for the socket.
This is the follow-on distinction from EINPROGRESS. The first nonblocking connect can return EINPROGRESS because connection establishment has started asynchronously; repeating connect() before that attempt resolves can yield EALREADY.
Correct nonblocking connect flow
- After
EINPROGRESS, register the socket with the application's readiness mechanism instead of immediately issuing another connect. - When readiness is reported, use the platform's documented completion check and retain the final socket error.
- Audit state ownership in event-driven code so two workers cannot independently start the same connection attempt.
References
- Oracle Solaris intro(2) errno catalog
- POSIX connect() error conditions
- POSIX socket() domain, type, and protocol rules
Looking for a different code? Search another status or error code.