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 |
561683,5 | Fix the sequence of sending the end-of-stream flag | dev | qt/qtgrpc | Status: MERGED | +2 | 0 |