Fix write should be writeArray.

This commit is contained in:
cheatfate 2020-10-31 03:23:34 +02:00
parent ff48d0b1a2
commit 04c95cb7b0
No known key found for this signature in database
GPG Key ID: 46ADD633A7201F95
1 changed files with 1 additions and 1 deletions

View File

@ -856,7 +856,7 @@ proc init*(mtype: typedesc[MultiAddress], address: ValidIpAddress,
of IpAddressFamily.IPv4: res.data.writeArray(address.address_v4)
of IpAddressFamily.IPv6: res.data.writeArray(address.address_v6)
res.data.write(transportProto.mcodec)
res.data.write(toBytesBE(uint16(port)))
res.data.writeArray(toBytesBE(uint16(port)))
res.data.finish()
ok(res)