Parcourir la source

Fix subscription read buffer not clearing with subsequent calls

Giulio Girardi il y a 4 ans
Parent
commit
44d4da249c
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      src/grpc/qgrpcchannel.cpp

+ 1 - 1
src/grpc/qgrpcchannel.cpp

@@ -89,10 +89,10 @@ QGrpcChannelSubscription::QGrpcChannelSubscription(grpc::Channel *channel, const
 
     thread = QThread::create([this](){
         grpc::ByteBuffer response;
-        QByteArray data;
         grpc::Status status;
 
         while (reader->Read(&response)) {
+            QByteArray data;
             status = parseByteBuffer(response, data);
 
             if (!status.ok()) {