chat.py very little code refactor. (#112)
That was an useless duplicate
This commit is contained in:
parent
9b6d61ca63
commit
82d08a3b14
|
@ -33,8 +33,8 @@ async def write_data(stream):
|
|||
|
||||
async def run(port, destination):
|
||||
|
||||
if not destination:
|
||||
host = await new_node(transport_opt=["/ip4/127.0.0.1/tcp/%s" % port])
|
||||
if not destination:
|
||||
|
||||
async def stream_handler(stream):
|
||||
asyncio.ensure_future(read_data(stream))
|
||||
|
@ -56,7 +56,6 @@ async def run(port, destination):
|
|||
print("\nWaiting for incoming connection\n\n")
|
||||
|
||||
else:
|
||||
host = await new_node(transport_opt=["/ip4/127.0.0.1/tcp/%s" % port])
|
||||
|
||||
m = multiaddr.Multiaddr(destination)
|
||||
info = info_from_p2p_addr(m)
|
||||
|
|
Loading…
Reference in New Issue
Block a user