From cceeb515927d72e3cfb24ecce4af89a9eed3b42b Mon Sep 17 00:00:00 2001
From: Jorge Canizales <jcanizales@google.com>
Date: Wed, 5 Aug 2015 17:16:42 -0700
Subject: [PATCH] Document intention of hostURL.port conditional check.

---
 src/objective-c/GRPCClient/private/GRPCHost.m | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/objective-c/GRPCClient/private/GRPCHost.m b/src/objective-c/GRPCClient/private/GRPCHost.m
index 05c72e447d..7355139fef 100644
--- a/src/objective-c/GRPCClient/private/GRPCHost.m
+++ b/src/objective-c/GRPCClient/private/GRPCHost.m
@@ -71,6 +71,7 @@
   if (![scheme isEqualToString:@"https"] && ![scheme isEqualToString:@"http"]) {
     [NSException raise:NSInvalidArgumentException format:@"URL scheme %@ isn't supported.", scheme];
   }
+  // If the user didn't specify a port (hostURL.port is nil), provide a default one.
   NSNumber *port = hostURL.port ?: [scheme isEqualToString:@"https"] ? @443 : @80;
   address = [@[hostURL.host, port] componentsJoinedByString:@":"];
 
-- 
GitLab