code: def detached(self, worker):
          
          for wfb in self.attaching_workers + self.workers:
              if wfb.worker == worker:
                  break
          else:
              log.msg("WEIRD: Builder.detached(%s) (%s)"
                      " not in attaching_workers(%s)"
                      " or workers(%s)" % (worker, worker.workername,
                                           self.attaching_workers,
                                           self.workers))
              return
  
          if wfb in self.attaching_workers:
              self.attaching_workers.remove(wfb)
          if wfb in self.workers:
              self.workers.remove(wfb)
  
          # inform the WorkerForBuilder that their worker went away
          wfb.detached()
docs: This is called when the connection to the bot is lost.