Explorar o código

Fix subscription read buffer not clearing with subsequent calls

Giulio Girardi %!s(int64=4) %!d(string=hai) anos
pai
achega
44d4da249c
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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()) {