소스 검색

nit fixes

Muxi Yan 7 년 전
부모
커밋
861e7ce452
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      src/objective-c/GRPCClient/private/GRPCChannel.m

+ 2 - 1
src/objective-c/GRPCClient/private/GRPCChannel.m

@@ -34,7 +34,7 @@
 #import <GRPCClient/GRPCCallOptions.h>
 #import <GRPCClient/GRPCCallOptions.h>
 
 
 /** When all calls of a channel are destroyed, destroy the channel after this much seconds. */
 /** When all calls of a channel are destroyed, destroy the channel after this much seconds. */
-NSTimeInterval kDefaultChannelDestroyDelay = 30;
+static const NSTimeInterval kDefaultChannelDestroyDelay = 30;
 
 
 @implementation GRPCChannelConfiguration
 @implementation GRPCChannelConfiguration
 
 
@@ -295,6 +295,7 @@ NSTimeInterval kDefaultChannelDestroyDelay = 30;
       NSDate *now = [NSDate date];
       NSDate *now = [NSDate date];
       self->_lastDispatch = now;
       self->_lastDispatch = now;
       dispatch_after(delay, self->_dispatchQueue, ^{
       dispatch_after(delay, self->_dispatchQueue, ^{
+        // Timed disconnection.
         if (self->_lastDispatch == now) {
         if (self->_lastDispatch == now) {
           grpc_channel_destroy(self->_unmanagedChannel);
           grpc_channel_destroy(self->_unmanagedChannel);
           self->_unmanagedChannel = NULL;
           self->_unmanagedChannel = NULL;