Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-125369

Grpc: writesDone http2 implementation is broken

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2: Important P2: Important
    • 6.8.0 FF
    • 6.8.0 FF
    • GRPC
    • None
    • edfb08ba0 (dev)

          void clientStreaming(size_t amount)
          {
              api::ClientStreamingRequest request;
              api::ClientStreamingResponse response;
              const auto stream = mClient.streamClientStreaming(request);
              QObject::connect(stream.get(), &QGrpcOperation::finished, &mClient, [stream]() {
                  handleFinished<api::ClientStreamingResponse>("clientStreaming", stream);
              });
      
              size_t count = 0;
              while (count++ < amount) {
                  request.setPing(count);
                  qDebug() << "Client clientStreaming: ping " << request.ping();
                  stream->sendMessage(request);
              }
              // QTimer::singleShot(200, [stream](){
              //     stream->writesDone();
              // });
              stream->writesDone();
          }
      

      results in:

      qt.grpc: Attempt sending headers to the ended stream
      qt.grpc: "ClientStreaming" call "api.TestService" stream error:  "Unable to create an HTTP/2 stream"
      

      We need to improve the implementation in QGrpcHttp2ChannelPrivate to handle this issue. This only happens if writesDone get's send before the channel is available in the http2 implementation

        For Gerrit Dashboard: QTBUG-125369
        # Subject Branch Project Status CR V

            semlanik Alexey Edelev
            dennisoberst Dennis Oberst
            Vladimir Minenko Vladimir Minenko
            Alex Blasche Alex Blasche
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes