Skip to content

Commit a391cce

Browse files
author
Jim Bennett
committed
Fix for #28
1 parent bd24155 commit a391cce

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

adafruit_minimqtt.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -614,8 +614,9 @@ def reconnect(self, resub_topics=True):
614614
self.logger.debug(
615615
"Attempting to resubscribe to previously subscribed topics."
616616
)
617-
while self._subscribed_topics:
618-
feed = self._subscribed_topics.pop()
617+
subscribed_topics = self._subscribed_topics.copy()
618+
while subscribed_topics:
619+
feed = subscribed_topics.pop()
619620
self.subscribe(feed)
620621

621622
def loop_forever(self):

0 commit comments

Comments
 (0)