Skip to content

Commit

Permalink
revert browse_next changes. Add check for index
Browse files Browse the repository at this point in the history
  • Loading branch information
Olivier committed Dec 18, 2023
1 parent 8a28018 commit b015aa9
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions asyncua/common/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -443,14 +443,17 @@ async def get_references(
return references

async def _browse_next(self, results: Iterable[ua.BrowseResult]) -> List[ua.ReferenceDescription]:
head = next(iter(results))
references = head.References
while head.ContinuationPoint:
if not results:
return []
references = results[0].References
while results[0].ContinuationPoint:
params = ua.BrowseNextParameters()
params.ContinuationPoints = [head.ContinuationPoint]
params.ContinuationPoints = [results[0].ContinuationPoint]
params.ReleaseContinuationPoints = False
results = await self.session.browse_next(params)
references.extend(head.References)
if not results:
break
references.extend(results[0].References)
return references

async def get_referenced_nodes(
Expand Down

0 comments on commit b015aa9

Please sign in to comment.