gsocketclient: fix crash when async connection step fails

Merged Michael Catanzaro requested to merge mcatanzaro/#2233 into master

This is a regression from !1686 (merged). The tmp_error is no longer valid after it is "considered" and cannot be used at this point. We should print the error earlier instead.

Fixes #2233 (closed)

Merge request reports