What does errno 149 (EALREADY) mean?

 
Could be also:
ConstantTypeOS
ERROR_IS_SUBST_TARGETWin32 errorWindows
PNP_INTERNAL_ERRORBugCheck CodeWindows
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


Looking for a different code? Search another status or error code.