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 @@ -52,9 +52,17 @@ void ClientGetReadReactor::OnReadInitialMetadataDone(bool ok) { std::lock_guard guard{this->setReadyStateMutex}; this->setReadyState(SocketStatus::OPEN); + if (this->onOpenCallback) { + std::lock_guard onOpenGuard{this->onOpenCallbackMutex}; + this->onOpenCallback(); + } } void ClientGetReadReactor::OnDone(const grpc::Status &status) { std::lock_guard guard{this->setReadyStateMutex}; this->setReadyState(SocketStatus::CLOSED); + if (this->onCloseCallback) { + std::lock_guard onCloseGuard{this->onCloseCallbackMutex}; + this->onCloseCallback(); + } }