Skip to content

Reconnect gets stuck in an infinite loop #28

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

Closed
jimbobbennett opened this issue Apr 17, 2020 · 0 comments
Closed

Reconnect gets stuck in an infinite loop #28

jimbobbennett opened this issue Apr 17, 2020 · 0 comments

Comments

@jimbobbennett
Copy link

I'm implementing reconnect logic in my Azure IoT library, and I've hit what looks like an in infinite loop in the reconnect logic.

When I call reconnect, the function call never ends. A quick read of the code shows this:

while self._subscribed_topics:
    feed = self._subscribed_topics.pop()
    self.subscribe(feed)

LInk:

while self._subscribed_topics:

The subscribe method puts the topic onto the _subscribed_topics list, so this list is never empty and the while loop never ends.

jimbobbennett pushed a commit to jimbobbennett/Adafruit_CircuitPython_MiniMQTT that referenced this issue Apr 17, 2020
@brentru brentru closed this as completed May 1, 2020
rtwfroody pushed a commit to rtwfroody/Adafruit_CircuitPython_MiniMQTT that referenced this issue Sep 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants