code: func (srv *Server) Stop() {
  	srv.lock.Lock()
  	if !srv.running {
  		srv.lock.Unlock()
  		return
  	}
  	srv.running = false
  	if srv.listener != nil {
  		// this unblocks listener Accept
  		srv.listener.Close()
  	}
  	close(srv.quit)
  	srv.lock.Unlock()
  	srv.loopWG.Wait()
  }
docs: // Stop terminates the server and all active peer connections.
  // It blocks until all active connections have been closed.