Switch to using channelInactive to detect a channel close event.