Merge clients that have the same id if it speaks on multiple addresses
This commit is contained in:
@@ -167,6 +167,13 @@ class HelloTLV(TLV):
|
||||
if self.is_long and self.dest_id == squirrel.id:
|
||||
time_hl = time.time()
|
||||
|
||||
if sender.id != self.source_id:
|
||||
squirrel.send_packet(sender, Packet.construct(WarningTLV.construct(
|
||||
f"You were known as the ID {sender.id}, but you declared that you have the ID {self.source_id}.")))
|
||||
squirrel.add_system_message(f"A client known as the id {sender.id} declared that it uses "
|
||||
f"the id {self.source_id}.")
|
||||
sender.id = self.source_id
|
||||
|
||||
# Add entry to/actualize the active hazelnuts dictionnary
|
||||
sender.last_hello_time = time_h
|
||||
sender.last_long_hello_time = time_hl
|
||||
|
||||
Reference in New Issue
Block a user