ensure closing the filedescriptor on error

or try caching the connection if the async operation was completed with no errors
ensure notifying the async context callback also in case of auth errors

without relying on read_async_input_data() taking care of detecting
the error and abort the operation