From 38cfef954cb0f3cb73a507b7b471be8ffeabd5c5 Mon Sep 17 00:00:00 2001 From: Amulya Varote Date: Tue, 4 Oct 2022 15:47:51 -0700 Subject: [PATCH 1/2] Changed distributedLock example to consider a new default port number Signed-off-by: Amulya Varote --- examples/Client/DistributedLock/Program.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/Client/DistributedLock/Program.cs b/examples/Client/DistributedLock/Program.cs index ecd00c347..40adfa044 100644 --- a/examples/Client/DistributedLock/Program.cs +++ b/examples/Client/DistributedLock/Program.cs @@ -21,7 +21,7 @@ public static IHostBuilder CreateHostBuilder(string[] args) => .ConfigureWebHostDefaults(webBuilder => { webBuilder.UseStartup() - .UseUrls($"http://localhost:{Environment.GetEnvironmentVariable("APP_PORT")}"); + .UseUrls($"http://localhost:{Environment.GetEnvironmentVariable("APP_PORT") ?? "22222"}"); }); } } From f5d44413c9b61cbb7013247306f8e2e3262963f1 Mon Sep 17 00:00:00 2001 From: Amulya Varote Date: Thu, 6 Oct 2022 10:18:46 -0700 Subject: [PATCH 2/2] Changes based on the review comments Signed-off-by: Amulya Varote --- examples/Client/DistributedLock/Program.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/Client/DistributedLock/Program.cs b/examples/Client/DistributedLock/Program.cs index 40adfa044..ba4d670a7 100644 --- a/examples/Client/DistributedLock/Program.cs +++ b/examples/Client/DistributedLock/Program.cs @@ -11,6 +11,7 @@ namespace DistributedLock { public class Program { + static string DEFAULT_APP_PORT = "22222"; public static void Main(string[] args) { CreateHostBuilder(args).Build().Run(); @@ -21,7 +22,7 @@ public static IHostBuilder CreateHostBuilder(string[] args) => .ConfigureWebHostDefaults(webBuilder => { webBuilder.UseStartup() - .UseUrls($"http://localhost:{Environment.GetEnvironmentVariable("APP_PORT") ?? "22222"}"); + .UseUrls($"http://localhost:{Environment.GetEnvironmentVariable("APP_PORT") ?? DEFAULT_APP_PORT}"); }); } }