def periodic_callback(self):
        """Periodic cleanup tasks to maintain this adapter, should be called every second
        """

        if self.stopped:
            return

        # Check if we should start scanning again
        if not self.scanning and len(self._connections) == 0 and self.connecting_count == 0:
            self._logger.info("Restarting scan for devices")
            self.start_scan(self._active_scan)
            self._logger.info("Finished restarting scan for devices")
Periodic cleanup tasks to maintain this adapter, should be called every second