use init instead of toMultiAddr

This commit is contained in:
Dmitriy Ryajov 2019-10-09 06:06:29 +09:00
parent 0b77c8c6e3
commit 7b66198566
1 changed files with 2 additions and 2 deletions

View File

@ -56,7 +56,7 @@ suite "TCP transport":
var server = createStreamServer(address, serveClient, {ReuseAddr})
server.start()
let ma: MultiAddress = server.sock.getLocalAddress().toMultiAddr()
let ma: MultiAddress = MultiAddress.init(server.sock.getLocalAddress())
let transport: TcpTransport = newTransport(TcpTransport)
let conn = await transport.dial(ma)
let msg = await conn.read(6)
@ -83,7 +83,7 @@ suite "TCP transport":
var server = createStreamServer(address, serveClient, {ReuseAddr})
server.start()
let ma: MultiAddress = server.sock.getLocalAddress().toMultiAddr()
let ma: MultiAddress = MultiAddress.init(server.sock.getLocalAddress())
let transport: TcpTransport = newTransport(TcpTransport)
let conn = await transport.dial(ma)
await conn.write(cstring("Hello!"), 6)