Commits
Darrell Schiebel authored 0d069004419 Merge
30 30 | |
31 31 | |
32 32 | |
33 33 | |
34 34 | |
35 35 | |
36 36 | namespace casa { |
37 37 | |
38 38 | constexpr char grpcPlotMS::APP_SERVER_SWITCH[]; |
39 39 | |
40 + | ::grpc::Status grpcPMSPing::now( ::grpc::ServerContext*, const ::google::protobuf::Empty*, ::google::protobuf::Empty* ) { |
41 + | static const auto debug = getenv("GRPC_DEBUG"); |
42 + | if ( debug ) { |
43 + | std::cerr << "received ping event..." << std::endl; |
44 + | fflush(stderr); |
45 + | } |
46 + | return grpc::Status::OK; |
47 + | } |
48 + | |
40 49 | ::grpc::Status grpcPMSShutdown::now(::grpc::ServerContext*, const ::google::protobuf::Empty*, ::google::protobuf::Empty*) { |
41 50 | if (getenv("GRPC_DEBUG")) { |
42 51 | std::cerr << "received shutdown notification..." << std::endl; |
43 52 | fflush(stderr); |
44 53 | } |
45 54 | if ( itsPlotms_ ) { |
46 55 | itsPlotms_ = NULL; |
47 56 | static auto bye_bye = std::async( std::launch::async, [=]( ) { sleep(2); emit exit_now( ); } ); |
48 57 | } |
49 58 | return grpc::Status::OK; |