Check ConnectionState for local connections.
Fix semantics