diff --git a/native/cpp/CommonCpp/grpc/ClientGetReadReactor.h b/native/cpp/CommonCpp/grpc/ClientGetReadReactor.h --- a/native/cpp/CommonCpp/grpc/ClientGetReadReactor.h +++ b/native/cpp/CommonCpp/grpc/ClientGetReadReactor.h @@ -28,6 +28,7 @@ void OnReadInitialMetadataDone(bool ok) override; void OnReadDone(bool ok) override; + void OnDone(const grpc::Status &status) override; void close(); void setOnOpenCallback(std::function onOpenCallback); diff --git a/native/cpp/CommonCpp/grpc/ClientGetReadReactor.cpp b/native/cpp/CommonCpp/grpc/ClientGetReadReactor.cpp --- a/native/cpp/CommonCpp/grpc/ClientGetReadReactor.cpp +++ b/native/cpp/CommonCpp/grpc/ClientGetReadReactor.cpp @@ -53,3 +53,8 @@ std::lock_guard guard{this->setReadyStateMutex}; this->setReadyState(SocketStatus::OPEN); } + +void ClientGetReadReactor::OnDone(const grpc::Status &status) { + std::lock_guard guard{this->setReadyStateMutex}; + this->setReadyState(SocketStatus::CLOSED); +}