Fixed invalid mutation in peer sync

This commit is contained in:
Mark Qvist 2021-10-08 17:34:27 +02:00
parent 831e91a87a
commit fbbda8153e

View File

@ -707,7 +707,8 @@ class LXMPeer:
else:
# Peer wants some advertised messages
for transient_id in self.unhandled_messages:
peer_had_messages = []
for transient_id in self.unhandled_messages.copy():
# If the peer did not want the message, it has
# already received it from another peer.
if not transient_id in response:
@ -742,6 +743,12 @@ class LXMPeer:
RNS.log("Error while handling offer response from peer "+str(self.destination), RNS.LOG_ERROR)
RNS.log("The contained exception was: "+str(e), RNS.LOG_ERROR)
if self.link != None:
self.link.teardown()
self.link = None
self.state = LXMPeer.IDLE
def resource_concluded(self, resource):
if resource.status == RNS.Resource.COMPLETE: