code: def worker_errordown(self, node, error):
          
          self.config.hook.pytest_testnodedown(node=node, error=error)
          try:
              crashitem = self.sched.remove_node(node)
          except KeyError:
              pass
          else:
              if crashitem:
                  self.handle_crashitem(crashitem, node)
  
          self._failed_nodes_count += 1
          maximum_reached = (
              self._max_worker_restart is not None
              and self._failed_nodes_count > self._max_worker_restart
          )
          if maximum_reached:
              if self._max_worker_restart == 0:
                  msg = "Worker restarting disabled"
              else:
                  msg = "Maximum crashed workers reached: %d" % self._max_worker_restart
              self.report_line(msg)
          else:
              self.report_line("Replacing crashed worker %s" % node.gateway.id)
              self._clone_node(node)
          self._active_nodes.remove(node)
docs: Emitted by the WorkerController when a node dies.