Fix the channel close failure bug