Fixed potential race condition in announce queue handling for AutoInterface

This commit is contained in:
Mark Qvist 2023-03-09 18:32:14 +01:00
parent 90cfaa4e82
commit fac4973329

View File

@ -214,6 +214,11 @@ class AutoInterface(Interface):
else:
self.receives = True
if configured_bitrate != None:
self.bitrate = configured_bitrate
else:
self.bitrate = AutoInterface.BITRATE_GUESS
peering_wait = self.announce_interval*1.2
RNS.log(str(self)+" discovering peers for "+str(round(peering_wait, 2))+" seconds...", RNS.LOG_VERBOSE)
@ -238,11 +243,6 @@ class AutoInterface(Interface):
time.sleep(peering_wait)
if configured_bitrate != None:
self.bitrate = configured_bitrate
else:
self.bitrate = AutoInterface.BITRATE_GUESS
self.online = True