3 Commit-ok 072af6ab32 ... 51615ca6bb

Szerző SHA1 Üzenet Dátum
  Alexey Edelev 51615ca6bb Fix handling of gRPC errors when the stream is finished 2 éve
  Alexey Edelev 7eeae7d11d Fix handling of gRPC errors when the stream is finished 2 éve
  Alexey Edelev 072af6ab32 Fix handling of gRPC errors when the stream is finished 2 éve
1 módosított fájl, 3 hozzáadás és 0 törlés
  1. 3 0
      src/grpc/qabstractgrpcclient.cpp

+ 3 - 0
src/grpc/qabstractgrpcclient.cpp

@@ -66,6 +66,9 @@ void QAbstractGrpcClient::attachChannel(const std::shared_ptr<QAbstractGrpcChann
                            "You have to be confident that channel routines are working in the same thread as QAbstractGrpcClient";
         throw std::runtime_error("Call from another thread");
     }
+    for (auto stream : dPtr->activeStreams) {
+        stream->cancel();
+    }
     dPtr->channel = channel;
     dPtr->serializer = channel->serializer();
     for (auto stream : dPtr->activeStreams) {