diff --git a/services/lib/src/client-base-reactors/ClientBidiReactorBase.h b/services/lib/src/client-base-reactors/ClientBidiReactorBase.h --- a/services/lib/src/client-base-reactors/ClientBidiReactorBase.h +++ b/services/lib/src/client-base-reactors/ClientBidiReactorBase.h @@ -16,7 +16,8 @@ template class ClientBidiReactorBase : public grpc::ClientBidiReactor, public BaseReactor { - std::shared_ptr statusHolder; + std::shared_ptr statusHolder = + std::make_shared(); std::shared_ptr response = nullptr; void nextWrite(); diff --git a/services/lib/src/client-base-reactors/ClientReadReactorBase.h b/services/lib/src/client-base-reactors/ClientReadReactorBase.h --- a/services/lib/src/client-base-reactors/ClientReadReactorBase.h +++ b/services/lib/src/client-base-reactors/ClientReadReactorBase.h @@ -15,7 +15,8 @@ template class ClientReadReactorBase : public grpc::ClientReadReactor, public BaseReactor { - std::shared_ptr statusHolder; + std::shared_ptr statusHolder = + std::make_shared(); Response response; public: diff --git a/services/lib/src/client-base-reactors/ClientWriteReactorBase.h b/services/lib/src/client-base-reactors/ClientWriteReactorBase.h --- a/services/lib/src/client-base-reactors/ClientWriteReactorBase.h +++ b/services/lib/src/client-base-reactors/ClientWriteReactorBase.h @@ -14,7 +14,8 @@ template class ClientWriteReactorBase : public grpc::ClientWriteReactor, public BaseReactor { - std::shared_ptr statusHolder; + std::shared_ptr statusHolder = + std::make_shared(); Request request; void nextWrite(); diff --git a/services/lib/src/server-base-reactors/ServerBidiReactorBase.h b/services/lib/src/server-base-reactors/ServerBidiReactorBase.h --- a/services/lib/src/server-base-reactors/ServerBidiReactorBase.h +++ b/services/lib/src/server-base-reactors/ServerBidiReactorBase.h @@ -31,7 +31,8 @@ template class ServerBidiReactorBase : public grpc::ServerBidiReactor, public BaseReactor { - std::shared_ptr statusHolder; + std::shared_ptr statusHolder = + std::make_shared(); Request request; Response response; diff --git a/services/lib/src/server-base-reactors/ServerReadReactorBase.h b/services/lib/src/server-base-reactors/ServerReadReactorBase.h --- a/services/lib/src/server-base-reactors/ServerReadReactorBase.h +++ b/services/lib/src/server-base-reactors/ServerReadReactorBase.h @@ -20,7 +20,8 @@ template class ServerReadReactorBase : public grpc::ServerReadReactor, public BaseReactor { - std::shared_ptr statusHolder; + std::shared_ptr statusHolder = + std::make_shared(); Request request; protected: diff --git a/services/lib/src/server-base-reactors/ServerWriteReactorBase.h b/services/lib/src/server-base-reactors/ServerWriteReactorBase.h --- a/services/lib/src/server-base-reactors/ServerWriteReactorBase.h +++ b/services/lib/src/server-base-reactors/ServerWriteReactorBase.h @@ -20,7 +20,7 @@ template class ServerWriteReactorBase : public grpc::ServerWriteReactor, public BaseReactor { - std::shared_ptr statusHolder; + std::shared_ptr statusHolder = std::make_shared(); Response response; bool initialized = false;