Skip to content

Reconnect gets stuck in an infinite loop #28

Closed
@jimbobbennett

Description

@jimbobbennett

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions