diff --git a/src/objective-c/GRPCClient/private/GRPCChannel.m b/src/objective-c/GRPCClient/private/GRPCChannel.m index 298b6605d1f..4f26b349b49 100644 --- a/src/objective-c/GRPCClient/private/GRPCChannel.m +++ b/src/objective-c/GRPCClient/private/GRPCChannel.m @@ -34,7 +34,7 @@ #import /** 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 @@ -295,6 +295,7 @@ NSTimeInterval kDefaultChannelDestroyDelay = 30; NSDate *now = [NSDate date]; self->_lastDispatch = now; dispatch_after(delay, self->_dispatchQueue, ^{ + // Timed disconnection. if (self->_lastDispatch == now) { grpc_channel_destroy(self->_unmanagedChannel); self->_unmanagedChannel = NULL;