Commit 03751311 authored by Pascal Engélibert's avatar Pascal Engélibert

Fix Peer class instantiation

parent 6ed95f60
......@@ -474,7 +474,7 @@ class ServerThread(Thread):
if new_pubkey == message["pubkey"]:
if not new_pubkey in self.peers_index:
peer = Peer(new_pubkey, message["host"], message["port"], True)
peer = utils.Peer(new_pubkey, message["host"], message["port"], True)
self.peers.append(peer)
self.peers_index[new_pubkey] = peer
utils.logPrint("Add "+str(peer), utils.LOG_TRACE)
......@@ -554,7 +554,7 @@ class ClientThread(Thread):
if i_peer["pubkey"] in self.peers_index or i_peer["pubkey"] == self.keys.pubkey:
continue
try:
new_peer = Peer(i_peer["pubkey"], i_peer["host"], i_peer["port"], None)
new_peer = utils.Peer(i_peer["pubkey"], i_peer["host"], i_peer["port"], None)
except ValueError:
utils.logPrint("Bad pubkey from "+str(peer), utils.LOG_ERROR)
continue
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment