Another Variant for detecting if a connection is closed

If there is a closed attribute on the connection and
it is true, return true. Implements a todo in the code
and helps in one specific disconnect case where it previously
did not match because the error message was "unknown error".