diff --git a/include/grpcpp/impl/codegen/server_callback.h b/include/grpcpp/impl/codegen/server_callback.h index da08ec963e4..ab47873e40a 100644 --- a/include/grpcpp/impl/codegen/server_callback.h +++ b/include/grpcpp/impl/codegen/server_callback.h @@ -348,7 +348,8 @@ class ServerBidiReactor : public internal::ServerReactor { private: friend class ServerCallbackReaderWriter; - void BindStream(ServerCallbackReaderWriter* stream) { + virtual void BindStream( + ServerCallbackReaderWriter* stream) { stream_ = stream; } @@ -382,7 +383,9 @@ class ServerReadReactor : public internal::ServerReactor { private: friend class ServerCallbackReader; - void BindReader(ServerCallbackReader* reader) { reader_ = reader; } + virtual void BindReader(ServerCallbackReader* reader) { + reader_ = reader; + } ServerCallbackReader* reader_; }; @@ -424,7 +427,9 @@ class ServerWriteReactor : public internal::ServerReactor { private: friend class ServerCallbackWriter; - void BindWriter(ServerCallbackWriter* writer) { writer_ = writer; } + virtual void BindWriter(ServerCallbackWriter* writer) { + writer_ = writer; + } ServerCallbackWriter* writer_; };