!47280 close the wingman queue only when it is created

Merge pull request !47280 from wYann/data_queue
This commit is contained in:
i-robot 2022-12-30 02:12:46 +00:00 committed by Gitee
commit 0b63a1f06e
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 3 additions and 0 deletions

View File

@ -671,6 +671,9 @@ void WingmanQueue::Close() {
std::shared_ptr<BlockingQueue> GetTdtWingManQueue(const std::shared_ptr<AnfNode> &node) {
if (common::AnfAlgo::GetCNodeName(node) != kGetNextOpName) return nullptr;
auto queue_name = common::AnfAlgo::GetNodeAttr<std::string>(node, "shared_name");
if (!DataQueueMgr::GetInstance().IsCreated(queue_name)) {
return nullptr;
}
return DataQueueMgr::GetInstance().GetDataQueue(queue_name);
}