code: func waitStreamReply(ctx context.Context, replySent <-chan struct{}, notify chan<- struct{}) {
  	select {
  	case <-replySent:
  		notify <- struct{}{}
  	case <-ctx.Done():
  	}
  }
docs: // waitStreamReply waits until either replySent or stop is closed. If replySent is closed, it sends
  // an empty struct to the notify channel.