Fixed issue when a connection is already in an open state.