!47323 close the wingman queue only when it is created

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

View File

@ -657,6 +657,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);
}