Trac #2052 - If the socket is closed, get rid of the connection process.
Trac #2052 - Do not format the error reason.

Formatting the error is a bad idea. We can't pattern match on it easily anymore and thus
we have no way of gripping the error in the caller and handling it correctly. And we can't change
the error to something meaningful upwards either.