Correction to the controller identifier number to get it working.
Whether connected doesn't matter when about release the connection.
Avoid NPE when connection is already closed.
Let the worker do CAPI release only when the channel is connected or
bound.