code: func (p *Peer) pingHandler() {
  	pingTicker := time.NewTicker(pingInterval)
  	defer pingTicker.Stop()
  
  out:
  	for {
  		select {
  		case <-pingTicker.C:
  			nonce, err := wire.RandomUint64()
  			if err != nil {
  				log.Errorf("Not sending ping to %s: %v", p, err)
  				continue
  			}
  			p.QueueMessage(wire.NewMsgPing(nonce), nil)
  
  		case <-p.quit:
  			break out
  		}
  	}
  }
docs: // pingHandler periodically pings the peer.  It must be run as a goroutine.