mirror of https://gitee.com/bigwinds/arangodb
Added shortcut if there is no possible way for shortest path
This commit is contained in:
parent
b56901f4d5
commit
bf497d22b5
|
@ -128,6 +128,7 @@ void Traverser::searchFromVertex (
|
|||
myInfo.mutex.unlock();
|
||||
nextVertexIt = myInfo.queue.begin();
|
||||
}
|
||||
bingo = true;
|
||||
// No possible path, can possibly terminate other thread
|
||||
};
|
||||
|
||||
|
@ -161,7 +162,7 @@ Traverser::Path* Traverser::ShortestPath (VertexId const& start,
|
|||
|
||||
cout << forwardInfo.lookup.size() << backwardInfo.lookup.size() << endl;
|
||||
|
||||
if (!bingo) {
|
||||
if (!bingo || intermediate == "") {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue