Fixed a race condition in link establishment flow
This commit is contained in:
parent
da644d33ea
commit
045a9d8451
@ -967,8 +967,6 @@ class Transport:
|
|||||||
new_raw += packet.raw[2:]
|
new_raw += packet.raw[2:]
|
||||||
|
|
||||||
outbound_interface = Transport.destination_table[packet.destination_hash][5]
|
outbound_interface = Transport.destination_table[packet.destination_hash][5]
|
||||||
Transport.transmit(outbound_interface, new_raw)
|
|
||||||
Transport.destination_table[packet.destination_hash][0] = time.time()
|
|
||||||
|
|
||||||
if packet.packet_type == RNS.Packet.LINKREQUEST:
|
if packet.packet_type == RNS.Packet.LINKREQUEST:
|
||||||
# Entry format is
|
# Entry format is
|
||||||
@ -991,6 +989,9 @@ class Transport:
|
|||||||
|
|
||||||
Transport.reverse_table[packet.getTruncatedHash()] = reverse_entry
|
Transport.reverse_table[packet.getTruncatedHash()] = reverse_entry
|
||||||
|
|
||||||
|
Transport.transmit(outbound_interface, new_raw)
|
||||||
|
Transport.destination_table[packet.destination_hash][0] = time.time()
|
||||||
|
|
||||||
else:
|
else:
|
||||||
# TODO: There should probably be some kind of REJECT
|
# TODO: There should probably be some kind of REJECT
|
||||||
# mechanism here, to signal to the source that their
|
# mechanism here, to signal to the source that their
|
||||||
|
Loading…
Reference in New Issue
Block a user