summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/pure/asyncio.nim10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/pure/asyncio.nim b/lib/pure/asyncio.nim
index 025ff5de0..2ac03061c 100644
--- a/lib/pure/asyncio.nim
+++ b/lib/pure/asyncio.nim
@@ -262,8 +262,9 @@ proc accept*(server: PAsyncSocket): PAsyncSocket {.deprecated.} =
   ## Equivalent to ``sockets.accept``.
   ##
   ## **Warning**: This is deprecated.
-  var (client, a) = server.acceptAddr()
-  return client
+  new(result)
+  var address = ""
+  server.acceptAddr(result, address)
 
 proc newDispatcher*(): PDispatcher =
   new(result)
@@ -435,7 +436,10 @@ when isMainModule:
 
   proc testAccept(s: PAsyncSocket, arg: PObject) =
     echo("Accepting client! " & $PMyArg(arg).val)
-    var (client, address) = s.acceptAddr()
+    var client: PAsyncSocket
+    new(client)
+    var address = ""
+    s.acceptAddr(client, address)
     echo("Accepted ", address)
     client.handleRead = testRead
     var userArg: PIntType