code: def check_scan_process(self, scan_id):
          
          scan_process = self.scan_processes[scan_id]
          progress = self.get_scan_progress(scan_id)
          if progress < 100 and not scan_process.is_alive():
              self.set_scan_status(scan_id, ScanStatus.STOPPED)
              self.add_scan_error(scan_id, name="", host="",
                                  value="Scan process failure.")
              logger.info("%s: Scan stopped with errors.", scan_id)
          elif progress == 100:
              scan_process.join()
docs: Check the scan's process, and terminate the scan if not alive.