Skip to content

Commit 63bb4ea

Browse files
committed
Reverted last change
1 parent 40e4b93 commit 63bb4ea

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

Diff for: sdk.cc

+4-5
Original file line numberDiff line numberDiff line change
@@ -248,16 +248,15 @@ namespace gaia {
248248
// Allocate memory for the automatic selected port.
249249
int * selectedPort = new int(0);
250250

251-
// Define health service and add it to gRPC server.
252-
grpc::HealthCheckServiceInterface* health_svc = server->GetHealthCheckService();
253-
health_svc->SetServingStatus("plugin", true);
254-
255251
// Enable health check service and start grpc server.
256252
grpc::EnableDefaultHealthCheckService(true);
257253
builder.AddListeningPort(LISTEN_ADDRESS + string(":0"), grpc::SslServerCredentials(ssl_ops), selectedPort);
258254
builder.RegisterService(&service);
259-
builder.RegisterService(&health_svc);
260255
unique_ptr<Server> server(builder.BuildAndStart());
256+
257+
// Define health service.
258+
grpc::HealthCheckServiceInterface* health_svc = server->GetHealthCheckService();
259+
health_svc->SetServingStatus("plugin", true);
261260

262261
// Output the address and service name to stdout.
263262
// hashicorp go-plugin will use that to establish connection.

0 commit comments

Comments
 (0)