What does Windows error code 1229 (ERROR_CONNECTION_INVALID) mean?

 
Previous Next
ERROR_ADDRESS_NOT_ASSOCIATED ERROR_CONNECTION_ACTIVE

ERROR_CONNECTION_INVALID

ERROR_CONNECTION_INVALID indicates that an operation targeted a network connection that does not exist in the subsystem handling the request. This is a connection-object lifecycle problem, not automatically a packet-routing failure.

Typical state-machine cause

Asynchronous networking code often separates logical connection IDs from native handles or provider objects. A disconnect can remove the underlying connection while queued work, timers, or another thread still retains its old identifier. The next operation then targets an object that the transport no longer recognizes.

What to log

  • The connection identifier or handle passed to the failing operation.
  • The first close, disconnect, cancellation, or provider-removal event for that connection.
  • Generation counters if identifiers can be reused.
  • Outstanding asynchronous work and callbacks at teardown time.

Compare this with ERROR_CONNECTION_ACTIVE: there the connection exists but its current active state forbids the requested operation. Here the referenced connection itself is absent. Recreating a new connection can restore service, but stale work must not be silently redirected to the new object.

Microsoft: system error codes 1000-1299 · Microsoft: Winsock overlapped I/O


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