summaryrefslogtreecommitdiff
path: root/hexnoise.py
diff options
context:
space:
mode:
Diffstat (limited to 'hexnoise.py')
-rwxr-xr-xhexnoise.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/hexnoise.py b/hexnoise.py
index 55a2be2..f2c1790 100755
--- a/hexnoise.py
+++ b/hexnoise.py
@@ -208,8 +208,6 @@ class NoiseEngine:
self.proto.start_handshake()
self.paired = False
self.connected = False
- self.packetizer.send_packet(PacketType.INITIATE_HANDSHAKE, b'')
- self.debug_print('Handshake started')
@wraps(print)
def debug_print(self, *args, **kwargs):
@@ -217,6 +215,9 @@ class NoiseEngine:
print(*args, **kwargs)
def perform_handshake(self):
+ self.packetizer.send_packet(PacketType.INITIATE_HANDSHAKE, b'')
+ self.debug_print('Handshake started')
+
while True:
if self.proto.handshake_finished:
break