code: func (srv *Server) runPeer(p *Peer) {
  	if srv.newPeerHook != nil {
  		srv.newPeerHook(p)
  	}
  
  	// broadcast peer add
  	srv.peerFeed.Send(&PeerEvent{
  		Type: PeerEventTypeAdd,
  		Peer: p.ID(),
  	})
  
  	// run the protocol
  	remoteRequested, err := p.run()
  
  	// broadcast peer drop
  	srv.peerFeed.Send(&PeerEvent{
  		Type:  PeerEventTypeDrop,
  		Peer:  p.ID(),
  		Error: err.Error(),
  	})
  
  	// Note: run waits for existing peers to be sent on srv.delpeer
  	// before returning, so this send should not select on srv.quit.
  	srv.delpeer <- peerDrop{p, err, remoteRequested}
  }
docs: // runPeer runs in its own goroutine for each peer.
  // it waits until the Peer logic returns and removes
  // the peer.