Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions grpc/src/compiler/cpp_generator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1122,16 +1122,12 @@ static void PrintHeaderService(grpc_generator::Printer* printer,
}
printer->Print(" StreamedService;\n");

printer->Outdent();
printer->Print("};\n");
printer->Print(service->GetTrailingComments("//").c_str());

// Optional CallbackService (modern async API)
if ((*vars)["generate_callback_api"] == "1") {
(*vars)["Service"] = service->name();
printer->Print("\n#if defined(GRPC_CALLBACK_API_NONEXPERIMENTAL)\n");
printer->Print(*vars,
"class $Service$::CallbackService : public ::grpc::Service "
"class CallbackService : public ::grpc::Service "
"{\n public:\n CallbackService();\n virtual "
"~CallbackService();\n");
printer->Indent();
Expand Down Expand Up @@ -1167,6 +1163,10 @@ static void PrintHeaderService(grpc_generator::Printer* printer,
"};\n#else\n// Callback API requested but not available in this gRPC "
"version.\n#endif // GRPC_CALLBACK_API_NONEXPERIMENTAL\n");
}

printer->Outdent();
printer->Print("};\n");
printer->Print(service->GetTrailingComments("//").c_str());
}

} // namespace
Expand Down