LPS-51193 Change the shutdownhook's duty to be initiating a channel clos...

...e, rather than trying to do the cleanup by itself.