aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--test/cpp/interop/stress_test.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/cpp/interop/stress_test.cc b/test/cpp/interop/stress_test.cc
index fc35db5233..97e658869f 100644
--- a/test/cpp/interop/stress_test.cc
+++ b/test/cpp/interop/stress_test.cc
@@ -371,9 +371,9 @@ int main(int argc, char** argv) {
}
// Start metrics server before waiting for the stress test threads
+ std::unique_ptr<grpc::Server> metrics_server;
if (FLAGS_metrics_port > 0) {
- std::unique_ptr<grpc::Server> metrics_server =
- metrics_service.StartServer(FLAGS_metrics_port);
+ metrics_server = metrics_service.StartServer(FLAGS_metrics_port);
}
// Wait for the stress test threads to complete