diff options
author | Muxi Yan <mxyan@google.com> | 2016-10-25 15:35:09 -0700 |
---|---|---|
committer | Muxi Yan <mxyan@google.com> | 2016-10-25 15:35:09 -0700 |
commit | e53707c481dea15ade9d02eeab6c23d18d5f8a04 (patch) | |
tree | 762cbed5b5084f20f506fa9f858e1ee347afd5d1 | |
parent | 6f5cfedfd56caddc1f1e99b9341c771d03f15b11 (diff) |
Update GRPCHost comments
-rw-r--r-- | src/objective-c/GRPCClient/private/GRPCHost.m | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/objective-c/GRPCClient/private/GRPCHost.m b/src/objective-c/GRPCClient/private/GRPCHost.m index c41cb81ee1..0524472f53 100644 --- a/src/objective-c/GRPCClient/private/GRPCHost.m +++ b/src/objective-c/GRPCClient/private/GRPCHost.m @@ -56,8 +56,9 @@ NS_ASSUME_NONNULL_BEGIN static NSMutableDictionary *kHostCache; // This connectivity monitor flushes the host cache when connectivity status -// changes. Otherwise, a new call might still use the cached channel which is -// no longer available and will call gRPC to hang +// changes or when connection switch between Wifi and Cellular data, so that a +// new call will use a new channel. Otherwise, a new call will still use the +// cached channel which is no longer available and will cause gRPC to hang. static GRPCConnectivityMonitor *connectivityMonitor = nil; @implementation GRPCHost { @@ -110,7 +111,7 @@ static GRPCConnectivityMonitor *connectivityMonitor = nil; _secure = YES; kHostCache[address] = self; } - // Keep a single monitor to flush the cache if the connectivity status changed + // Keep a single monitor to flush the cache if the connectivity status changes // Thread safety guarded by @synchronized(kHostCache) if (!connectivityMonitor) { connectivityMonitor = |