diff --git a/src/grpc_client.cc b/src/grpc_client.cc index 90c4ee56..bdd23d20 100644 --- a/src/grpc_client.cc +++ b/src/grpc_client.cc @@ -60,6 +60,7 @@ namespace grpc_labview void ClientCall::Cancel() { _context.get()->Cancel(); + _cancelled = true; } //--------------------------------------------------------------------- @@ -202,6 +203,10 @@ void CheckActiveAndSignalOccurenceForClientCall(grpc_labview::ClientCall *client { return; } + if (clientCall->_cancelled == true) + { + grpc_labview::SignalOccurrence(clientCall->_occurrence); + } std::unique_lock lock(clientCall->_client->clientLock); if (clientCall->_client->ActiveClientCalls.find(clientCall) != clientCall->_client->ActiveClientCalls.end()) { diff --git a/src/grpc_client.h b/src/grpc_client.h index b1f953a5..916ced8f 100644 --- a/src/grpc_client.h +++ b/src/grpc_client.h @@ -62,6 +62,7 @@ namespace grpc_labview grpc::Status _status; std::future _runFuture; bool _useLVEfficientMessage; + bool _cancelled = false; }; //---------------------------------------------------------------------