revised connection failure handling for csocket_impl (part 2)