public static void Shutdown(this ChannelBase channel, ILogger logger = null)
Shuts down a channel semi-synchronously. This method initially calls Dispose()
if the channel implements IDisposable (e.g. in the case of )
and then calls . This method does not wait for the task
to complete, but observes any exceptions (whether the task is faulted or canceled), optionally logging
them to logger.
Parameters
Name
Description
channel
ChannelBase
The channel to shut down.
logger
ILogger
An optional logger to record any errors during asynchronous shutdown.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eVersion 4.3.1 of the \u003ccode\u003eChannelBaseExtensions\u003c/code\u003e class is detailed, with links to documentation for other versions ranging from 3.2.0 to the latest 4.10.0.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eChannelBaseExtensions\u003c/code\u003e provides extension methods for working with channels and inherits from the base \u003ccode\u003eobject\u003c/code\u003e class, with a list of inherited members provided for reference.\u003c/p\u003e\n"],["\u003cp\u003eThe class is part of the \u003ccode\u003eGoogle.Api.Gax.Grpc\u003c/code\u003e namespace, and is included in the \u003ccode\u003eGoogle.Api.Gax.Grpc.dll\u003c/code\u003e assembly.\u003c/p\u003e\n"],["\u003cp\u003eThe primary method is \u003ccode\u003eShutdown\u003c/code\u003e, which semi-synchronously shuts down a \u003ccode\u003eChannelBase\u003c/code\u003e channel and optionally logs errors during asynchronous shutdown, accepting \u003ccode\u003eChannelBase\u003c/code\u003e and \u003ccode\u003eILogger\u003c/code\u003e parameters.\u003c/p\u003e\n"]]],[],null,[]]