summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorDominik Picheta <dominikpicheta@googlemail.com>2014-09-09 15:58:44 +0100
committerDominik Picheta <dominikpicheta@googlemail.com>2014-09-09 15:58:44 +0100
commit00b6a144894945d92fe3747fdf9bad32a4aec8d8 (patch)
treee4ed8822d9c366f092ede0ec08e6813c82b1c0ae
parent4fc8fcf37c61529e2c9ad2827df18254a0fc8fd2 (diff)
downloadNim-00b6a144894945d92fe3747fdf9bad32a4aec8d8.tar.gz
More empty stmt fixes.
-rw-r--r--lib/pure/asynchttpserver.nim1
-rw-r--r--tests/async/tasyncawait.nim11
-rw-r--r--tests/async/tasyncdiscard.nim4
3 files changed, 5 insertions, 11 deletions
diff --git a/lib/pure/asynchttpserver.nim b/lib/pure/asynchttpserver.nim
index 70a865ed5..931a0c15a 100644
--- a/lib/pure/asynchttpserver.nim
+++ b/lib/pure/asynchttpserver.nim
@@ -183,6 +183,7 @@ proc processClient(client: PAsyncSocket, address: string,
       # header states otherwise.
       # In HTTP 1.0 we assume that the connection should not be persistent.
       # Unless the connection header states otherwise.
+      discard
     else:
       request.client.close()
       break
diff --git a/tests/async/tasyncawait.nim b/tests/async/tasyncawait.nim
index efb6f0c25..5165b0f06 100644
--- a/tests/async/tasyncawait.nim
+++ b/tests/async/tasyncawait.nim
@@ -21,15 +21,8 @@ proc launchSwarm(port: TPort) {.async.} =
     var sock = newAsyncRawSocket()
 
     await connect(sock, "localhost", port)
-    when true:
-      await sendMessages(sock)
-      closeSocket(sock)
-    else:
-      # Issue #932: https://github.com/Araq/Nim/issues/932
-      var msgFut = sendMessages(sock)
-      msgFut.callback =
-        proc () =
-          closeSocket(sock)
+    await sendMessages(sock)
+    closeSocket(sock)
 
 proc readMessages(client: TAsyncFD) {.async.} =
   while true:
diff --git a/tests/async/tasyncdiscard.nim b/tests/async/tasyncdiscard.nim
index 966851acc..71aba29e2 100644
--- a/tests/async/tasyncdiscard.nim
+++ b/tests/async/tasyncdiscard.nim
@@ -13,7 +13,7 @@ discard """
 import asyncio, asyncdispatch, asyncnet
 
 proc main {.async.} =
-  proc f: PFuture[int] {.async.} =
+  proc f: Future[int] {.async.} =
     discard
     echo 1
     discard
@@ -24,7 +24,7 @@ proc main {.async.} =
   echo x
   echo 3
 
-  proc g: PFuture[int] {.async.} =
+  proc g: Future[int] {.async.} =
     discard
     echo 4
     discard