| Previous | Next |
| ERROR_CONNECTION_INVALID | ERROR_NETWORK_UNREACHABLE |
ERROR_CONNECTION_ACTIVE
ERROR_CONNECTION_ACTIVE is a state mismatch: the network connection still exists and is active, but the requested operation is not valid while it remains in that state.
Why this differs from an invalid connection
ERROR_CONNECTION_INVALID refers to a connection that does not exist. ERROR_CONNECTION_ACTIVE instead says that teardown, reconfiguration, reassociation, or another state-sensitive operation was attempted too early. Closing more aggressively without understanding the operation can create races with I/O already in progress.
Useful evidence
- The exact API or provider operation that returned the code.
- The connection state immediately before the call.
- Outstanding sends, receives, requests, or mapped resources.
- Whether a graceful disconnect was requested and whether completion was observed.
- Concurrent code paths that can reopen or reactivate the connection.
The fix is usually to enforce state ordering: complete or cancel the work that keeps the connection active, observe the documented transition, and only then perform the restricted operation. A blind retry loop can race indefinitely with the same active state.
Microsoft: system error codes 1000-1299 · Microsoft: shutdown · IETF: TCP connection states
Looking for a different code? Search another status or error code.