Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XBeeNetwork.__last_search_dev_list grows infinitely #172

Closed
Eric-Levine opened this issue May 6, 2020 · 1 comment
Closed

XBeeNetwork.__last_search_dev_list grows infinitely #172

Eric-Levine opened this issue May 6, 2020 · 1 comment
Labels

Comments

@Eric-Levine
Copy link

Every time the discovery process finds a node (including a node that has already been seen), it adds that node to the __last_search_dev_list (code).

The list is never emptied or maintained, and appears to only be used in one place (code).

I'm not entirely sure what the goal of the list is, but at a guess based on naming, it seems to be a list that should reflect nodes discovered during the last node discovery process. If that's correct, this problem could be resolved by clearing the list when node discovery is started.

A potential stopgap that I have yet to test is just manually emptying the list before starting discovery

My use case is long-running service on an embedded system where the discovery process is running constantly (XBeeNetwork.start_discovery_process() is called at the end of my discovery process finished callback). I'm using XBee Pro S3B modules in API mode with escapes.

tatianaleon added a commit that referenced this issue May 14, 2020
When a non-deep discovery is launched, all discovered nodes are added to a
list. But this list is never emptied that is clearly a memory leak.

This commit clears this list before starting a new discovery process and once
the discovery of a list of devices finishes.

#172

Signed-off-by: Tatiana Leon <tatiana.leon@digi.com>
@tatianaleon
Copy link
Contributor

Hi @Eric-Levine,

Thanks for reporting this issue. We have just fixed it in master (see commit 9688688) and will be included in the next release.

In the meantime, you can download the source code from the master branch and install the library from there (see instructions at https://github.com/digidotcom/python-xbee/blob/master/README.rst#install-from-source).

Sorry for the inconvenience.

Best regards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants