3 Commits 072af6ab32 ... 51615ca6bb

Autore SHA1 Messaggio Data
  Alexey Edelev 51615ca6bb Fix handling of gRPC errors when the stream is finished 2 anni fa
  Alexey Edelev 7eeae7d11d Fix handling of gRPC errors when the stream is finished 2 anni fa
  Alexey Edelev 072af6ab32 Fix handling of gRPC errors when the stream is finished 2 anni fa
1 ha cambiato i file con 3 aggiunte e 0 eliminazioni
  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) {