1a493c4508
Don't send a close message for a nil channel ID, and if we do send a close message, only do it once. I could have added a mutex somewher in _close(), but because it's a class method, it's a little awkward and would require all of the callers to instead have voluntary lock. As an alternative, I just made the finalizer close the channel instead. Fixes #10177