Fixed potential race condition in announce queue handling for AutoInterface
This commit is contained in:
parent
90cfaa4e82
commit
fac4973329
@ -214,6 +214,11 @@ class AutoInterface(Interface):
|
|||||||
else:
|
else:
|
||||||
self.receives = True
|
self.receives = True
|
||||||
|
|
||||||
|
if configured_bitrate != None:
|
||||||
|
self.bitrate = configured_bitrate
|
||||||
|
else:
|
||||||
|
self.bitrate = AutoInterface.BITRATE_GUESS
|
||||||
|
|
||||||
peering_wait = self.announce_interval*1.2
|
peering_wait = self.announce_interval*1.2
|
||||||
RNS.log(str(self)+" discovering peers for "+str(round(peering_wait, 2))+" seconds...", RNS.LOG_VERBOSE)
|
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)
|
time.sleep(peering_wait)
|
||||||
|
|
||||||
if configured_bitrate != None:
|
|
||||||
self.bitrate = configured_bitrate
|
|
||||||
else:
|
|
||||||
self.bitrate = AutoInterface.BITRATE_GUESS
|
|
||||||
|
|
||||||
self.online = True
|
self.online = True
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user