diff options
author | Vijay Pai <vpai@google.com> | 2018-10-30 12:29:35 -0700 |
---|---|---|
committer | Vijay Pai <vpai@google.com> | 2018-10-30 12:29:35 -0700 |
commit | 47d0d5bf1f163e9dc03a771156aa712dc0716d2b (patch) | |
tree | f2e0178f36785999a1697e80817a54b0d6dd77aa /include/grpcpp/server.h | |
parent | 84e763f10a1e10d36c7de35970f9d25958ee2e16 (diff) | |
parent | 53df56529bfb30214ece3ad5d90c07aa323d776b (diff) |
Merge branch 'master' into server_callback
Diffstat (limited to 'include/grpcpp/server.h')
-rw-r--r-- | include/grpcpp/server.h | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/include/grpcpp/server.h b/include/grpcpp/server.h index ef54a218a7..a14a4da578 100644 --- a/include/grpcpp/server.h +++ b/include/grpcpp/server.h @@ -191,8 +191,7 @@ class Server : public ServerInterface, private GrpcLibraryCodegen { grpc_server* server() override { return server_; }; private: - const std::vector< - std::unique_ptr<experimental::ServerInterceptorFactoryInterface>>* + std::vector<std::unique_ptr<experimental::ServerInterceptorFactoryInterface>>* interceptor_creators() override { return &interceptor_creators_; } @@ -229,6 +228,14 @@ class Server : public ServerInterface, private GrpcLibraryCodegen { ServerInitializer* initializer(); + // A vector of interceptor factory objects. + // This should be destroyed after health_check_service_ and this requirement + // is satisfied by declaring interceptor_creators_ before + // health_check_service_. (C++ mandates that member objects be destroyed in + // the reverse order of initialization.) + std::vector<std::unique_ptr<experimental::ServerInterceptorFactoryInterface>> + interceptor_creators_; + const int max_receive_message_size_; /// The following completion queues are ONLY used in case of Sync API @@ -268,9 +275,6 @@ class Server : public ServerInterface, private GrpcLibraryCodegen { // A special handler for resource exhausted in sync case std::unique_ptr<internal::MethodHandler> resource_exhausted_handler_; - std::vector<std::unique_ptr<experimental::ServerInterceptorFactoryInterface>> - interceptor_creators_; - // callback_cq_ references the callbackable completion queue associated // with this server (if any). It is set on the first call to CallbackCQ(). // It is _not owned_ by the server; ownership belongs with its internal |