diff --git a/src/grpc/qgrpchttp2channel.cpp b/src/grpc/qgrpchttp2channel.cpp index 6f6e6e38..b0cf2040 100644 --- a/src/grpc/qgrpchttp2channel.cpp +++ b/src/grpc/qgrpchttp2channel.cpp @@ -1124,15 +1124,9 @@ void QGrpcHttp2ChannelPrivate::ensureSchemeIsValid(QLatin1String expected) bool QGrpcHttp2ChannelPrivate::createHttp2Stream(Http2Handler *handler) { Q_ASSERT(handler != nullptr); + Q_ASSERT(m_connection); auto *channelOpPtr = handler->operation(); - if (!m_connection) { - operationContextAsyncError(channelOpPtr, - QGrpcStatus{ StatusCode::Unavailable, - tr("Unable to establish an HTTP/2 connection") }); - return false; - } - const auto streamAttempt = m_connection->createStream(); if (!streamAttempt.ok()) { operationContextAsyncError(channelOpPtr,