code: func (s *server) peerDoneHandler(sp *serverPeer) {
  	sp.WaitForDisconnect()
  	s.donePeers <- sp
  
  	// Only tell sync manager we are gone if we ever told it we existed.
  	if sp.VersionKnown() {
  		s.syncManager.DonePeer(sp.Peer)
  
  		// Evict any remaining orphans that were sent by the peer.
  		numEvicted := s.txMemPool.RemoveOrphansByTag(mempool.Tag(sp.ID()))
  		if numEvicted > 0 {
  			txmpLog.Debugf("Evicted %d %s from peer %v (id %d)",
  				numEvicted, pickNoun(numEvicted, "orphan",
  					"orphans"), sp, sp.ID())
  		}
  	}
  	close(sp.quit)
  }
docs: // peerDoneHandler handles peer disconnects by notifiying the server that it's
  // done along with other performing other desirable cleanup.