I have a transparenty proxy extension, which proxies outgoing TCP connections to an upstream server. In certain circumstances, I'm getting back an error 50 (ENETDOWN) for what appears to be an orderly shutdown of the server nw_connection_t.
The basic flow is:
- Client sends orderly shutdown.
- Proxy forwards orderly shutdown to server.
- Server disconnects with its own orderly shutdown.
- The nw_connection_state_changed_handler is invoked with nw_connection_state_failed / ENETDOWN.
My proxy is serializing all of its handlers on a single queue.
I'm trying to determine if this is the expected behavior, or if there's something I should be doing differently.