summary refs log tree commit diff stats
path: root/tests/async
diff options
context:
space:
mode:
authorJosep Sanjuas <jsanjuas@gmail.com>2016-03-27 22:56:05 +0200
committerJosep Sanjuas <jsanjuas@gmail.com>2016-03-27 22:56:44 +0200
commit5a582a0d9c497b9a5d3efcb48954f06c187f8c0a (patch)
tree9e51f2ff19616680752c6f91679233f7eca4beb0 /tests/async
parenta88584dde1d0cc075a3518124306e0c9b29ca01c (diff)
downloadNim-5a582a0d9c497b9a5d3efcb48954f06c187f8c0a.tar.gz
Define ports as uint16s to fix #3484
Diffstat (limited to 'tests/async')
-rw-r--r--tests/async/tasyncawait.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/async/tasyncawait.nim b/tests/async/tasyncawait.nim
index 443f769cd..9fe9507ad 100644
--- a/tests/async/tasyncawait.nim
+++ b/tests/async/tasyncawait.nim
@@ -45,7 +45,7 @@ proc createServer(port: TPort) {.async.} =
       name.sin_family = toInt(AF_INET).int16
     else:
       name.sin_family = toInt(AF_INET)
-    name.sin_port = htons(int16(port))
+    name.sin_port = htons(uint16(port))
     name.sin_addr.s_addr = htonl(INADDR_ANY)
     if bindAddr(server.SocketHandle, cast[ptr SockAddr](addr(name)),
                 sizeof(name).Socklen) < 0'i32: