Handle cleansession false to cleansession true and stop close on closed channel when takeover