Adding more support for connection opening and closing.