code: func (s *Serf) resolveNodeConflict() {
  	// Get the local node
  	local := s.memberlist.LocalNode()
  
  	// Start a name resolution query
  	qName := internalQueryName(conflictQuery)
  	payload := []byte(s.config.NodeName)
  	resp, err := s.Query(qName, payload, nil)
  	if err != nil {
  		s.logger.Printf("[ERR] serf: Failed to start name resolution query: %v", err)
  		return
  	}
  
  	// Counter to determine winner
  	var responses, matching int
  
  	// Gather responses
  	respCh := resp.ResponseCh()
  	for r := range respCh {
  		// Decode the response
  		if len(r.Payload) < 1 || messageType(r.Payload[0]) != messageConflictResponseType {
  			s.logger.Printf("[ERR] serf: Invalid conflict query response type: %v", r.Payload)
  			continue
  		}
  		var member Member
  		if err := decodeMessage(r.Payload[1:], &member); err != nil {
  			s.logger.Printf("[ERR] serf: Failed to decode conflict query response: %v", err)
  			continue
  		}
  
  		// Update the counters
  		responses++
  		if member.Addr.Equal(local.Addr) && member.Port == local.Port {
  			matching++
  		}
  	}
  
  	// Query over, determine if we should live
  	majority := (responses / 2) + 1
  	if matching >= majority {
  		s.logger.Printf("[INFO] serf: majority in name conflict resolution [%d / %d]",
  			matching, responses)
  		return
  	}
  
  	// Since we lost the vote, we need to exit
  	s.logger.Printf("[WARN] serf: minority in name conflict resolution, quiting [%d / %d]",
  		matching, responses)
  	if err := s.Shutdown(); err != nil {
  		s.logger.Printf("[ERR] serf: Failed to shutdown: %v", err)
  	}
  }
docs: // resolveNodeConflict is used to determine which node should remain during
  // a name conflict. This is done by running an internal query.