use channel close to notify all function close