code: func (s *Server) Stop(ctx context.Context) error {
  	// Close the socket. It notifies the serving loop to stop.
  	if err := s.killServe(); err != nil {
  		return err
  	}
  
  	// Wait for the serving loop to actually stop.
  	select {
  	case <-s.stopped:
  		logging.Debugf(ctx, "The local server %q has stopped", s.name)
  	case <-clock.After(ctx, 10*time.Second):
  		logging.Errorf(ctx, "Giving up waiting for the local server %q to stop", s.name)
  	}
  
  	return nil
  }
docs: // Stop closes the listening socket, notifies pending requests to abort and
  // stops the internal serving goroutine.
  //
  // Safe to call multiple times. Once stopped, the server cannot be started again
  // (make a new instance of Server instead).
  //
  // Uses the given context for the deadline when waiting for the serving loop
  // to stop.