summary refs log tree commit diff stats
path: root/tests/async/tasyncawait.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/async/tasyncawait.nim')
-rw-r--r--tests/async/tasyncawait.nim5
1 files changed, 1 insertions, 4 deletions
diff --git a/tests/async/tasyncawait.nim b/tests/async/tasyncawait.nim
index 74933f063..e7a2ec1d9 100644
--- a/tests/async/tasyncawait.nim
+++ b/tests/async/tasyncawait.nim
@@ -41,10 +41,7 @@ proc createServer(port: Port) {.async.} =
   var server = newAsyncNativeSocket()
   block:
     var name: Sockaddr_in
-    when defined(windows):
-      name.sin_family = toInt(AF_INET).int16
-    else:
-      name.sin_family = toInt(AF_INET)
+    name.sin_family = toInt(AF_INET).uint16
     name.sin_port = htons(uint16(port))
     name.sin_addr.s_addr = htonl(INADDR_ANY)
     if bindAddr(server.SocketHandle, cast[ptr SockAddr](addr(name)),