diff options
author | Jorge Canizales <jcanizales@google.com> | 2015-08-05 17:16:42 -0700 |
---|---|---|
committer | Jorge Canizales <jcanizales@google.com> | 2015-08-05 17:16:42 -0700 |
commit | cceeb515927d72e3cfb24ecce4af89a9eed3b42b (patch) | |
tree | 94eed4b7a53aadacfa387326ef722e8f2a871744 | |
parent | 83b7971c10d18fcc1c04056a028860283b2be051 (diff) |
Document intention of hostURL.port conditional check.
-rw-r--r-- | src/objective-c/GRPCClient/private/GRPCHost.m | 1 |
1 files changed, 1 insertions, 0 deletions
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:@":"]; |