(http:endpoint) selectively call close_connection
(http:endpoint) selectively call close_connection

If the connection was closed by the far end, then it'll be connecting when the previous request is resolved or rejected.

Also the connection object should always be set to nil when connection_closed is called for predictable state. (there is no connection at this point.)

cotag/uv-rays