Add correct logic to enable the close connection button and disable the open connection button when it's okay.