Send a long hello as a response of a HelloTLV

This commit is contained in:
Yohann D'ANELLO 2021-01-05 17:11:34 +01:00
parent 5c9b63d9db
commit 18d1737914
Signed by: ynerant
GPG Key ID: 3A75C55819C8CF85
1 changed files with 4 additions and 2 deletions

View File

@ -176,8 +176,10 @@ class HelloTLV(TLV):
sender.symmetric = True
squirrel.activehazelnuts[(sender.address, sender.port)] = sender
squirrel.nbNS += 1
# squirrel.add_system_message(f"Aaaawwww, {self.source_id} spoke to me and said Hello "
# + ("long" if self.is_long else "short"))
squirrel.add_system_message(f"{self.source_id} sent me a Hello " + ("long" if self.is_long else "short"))
if not self.is_long:
squirrel.send_packet(sender, Packet.construct(HelloTLV.construct(16, squirrel, sender)))
@property
def is_long(self) -> bool: