From 00019f5a6278fd5b4f363464283dc279c08c2a20 Mon Sep 17 00:00:00 2001 From: Yang Gao Date: Fri, 8 May 2015 12:36:55 -0700 Subject: [PATCH] update route_guide --- cpp/route_guide/route_guide_client.cc | 8 +------- cpp/route_guide/route_guide_server.cc | 6 ++---- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/cpp/route_guide/route_guide_client.cc b/cpp/route_guide/route_guide_client.cc index e2b7d5a58e9..91e1cebfc7a 100644 --- a/cpp/route_guide/route_guide_client.cc +++ b/cpp/route_guide/route_guide_client.cc @@ -205,8 +205,6 @@ class RouteGuideClient { } } - void Shutdown() { stub_.reset(); } - private: bool GetOneFeature(const Point& point, Feature* feature) { @@ -238,8 +236,6 @@ class RouteGuideClient { }; int main(int argc, char** argv) { - grpc_init(); - // Expect only arg: --db_path=path/to/route_guide_db.json. std::string db = examples::GetDbFileContent(argc, argv); RouteGuideClient guide( @@ -256,7 +252,5 @@ int main(int argc, char** argv) { std::cout << "-------------- RouteChat --------------" << std::endl; guide.RouteChat(); - guide.Shutdown(); - - grpc_shutdown(); + return 0; } diff --git a/cpp/route_guide/route_guide_server.cc b/cpp/route_guide/route_guide_server.cc index 417f7815351..8a0ea26132a 100644 --- a/cpp/route_guide/route_guide_server.cc +++ b/cpp/route_guide/route_guide_server.cc @@ -111,7 +111,8 @@ class RouteGuideImpl final : public RouteGuide::Service { return Status::OK; } - Status ListFeatures(ServerContext* context, const examples::Rectangle* rectangle, + Status ListFeatures(ServerContext* context, + const examples::Rectangle* rectangle, ServerWriter* writer) override { auto lo = rectangle->lo(); auto hi = rectangle->hi(); @@ -195,12 +196,9 @@ void RunServer(const std::string& db_path) { } int main(int argc, char** argv) { - grpc_init(); - // Expect only arg: --db_path=path/to/route_guide_db.json. std::string db = examples::GetDbFileContent(argc, argv); RunServer(db); - grpc_shutdown(); return 0; }