docs: def finish_and_die(self):
          """
          If there is a request pending, let it finish and be handled, then
          disconnect and die. If not, cancel any pending queue requests and
          just die.
          """
          self.logstate('finish_and_die')
          self.stop_working_on_queue()
          if self.jobphase != 'pending_request':
              self.stopFactory()