aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/csharp/Grpc.IntegrationTesting/InteropServer.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/csharp/Grpc.IntegrationTesting/InteropServer.cs')
-rw-r--r--src/csharp/Grpc.IntegrationTesting/InteropServer.cs9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/csharp/Grpc.IntegrationTesting/InteropServer.cs b/src/csharp/Grpc.IntegrationTesting/InteropServer.cs
index ad5200774f..ca54aed041 100644
--- a/src/csharp/Grpc.IntegrationTesting/InteropServer.cs
+++ b/src/csharp/Grpc.IntegrationTesting/InteropServer.cs
@@ -93,16 +93,17 @@ namespace Grpc.IntegrationTesting
var server = new Server();
server.AddServiceDefinition(TestServiceGrpc.BindService(new TestServiceImpl()));
- string addr = "0.0.0.0:" + options.port;
+ string host = "0.0.0.0";
+ int port = options.port.Value;
if (options.useTls)
{
- server.AddListeningPort(addr, TestCredentials.CreateTestServerCredentials());
+ server.AddListeningPort(host, port, TestCredentials.CreateTestServerCredentials());
}
else
{
- server.AddListeningPort(addr);
+ server.AddListeningPort(host, options.port.Value);
}
- Console.WriteLine("Running server on " + addr);
+ Console.WriteLine("Running server on " + string.Format("{0}:{1}", host, port));
server.Start();
server.ShutdownTask.Wait();