def close(self):
        """Close the connection

        :raises: ConnectionBusyError

        """
        LOGGER.debug('Connection %s closing', self.id)
        if self.busy:
            raise ConnectionBusyError(self)
        with self._lock:
            if not self.handle.closed:
                try:
                    self.handle.close()
                except psycopg2.InterfaceError as error:
                    LOGGER.error('Error closing socket: %s', error)
Close the connection

        :raises: ConnectionBusyError