More empty stmt fixes.
This commit is contained in:
parent
4fc8fcf37c
commit
00b6a14489
3 changed files with 5 additions and 11 deletions
|
|
@ -183,6 +183,7 @@ proc processClient(client: PAsyncSocket, address: string,
|
||||||
# header states otherwise.
|
# header states otherwise.
|
||||||
# In HTTP 1.0 we assume that the connection should not be persistent.
|
# In HTTP 1.0 we assume that the connection should not be persistent.
|
||||||
# Unless the connection header states otherwise.
|
# Unless the connection header states otherwise.
|
||||||
|
discard
|
||||||
else:
|
else:
|
||||||
request.client.close()
|
request.client.close()
|
||||||
break
|
break
|
||||||
|
|
|
||||||
|
|
@ -21,15 +21,8 @@ proc launchSwarm(port: TPort) {.async.} =
|
||||||
var sock = newAsyncRawSocket()
|
var sock = newAsyncRawSocket()
|
||||||
|
|
||||||
await connect(sock, "localhost", port)
|
await connect(sock, "localhost", port)
|
||||||
when true:
|
|
||||||
await sendMessages(sock)
|
await sendMessages(sock)
|
||||||
closeSocket(sock)
|
closeSocket(sock)
|
||||||
else:
|
|
||||||
# Issue #932: https://github.com/Araq/Nim/issues/932
|
|
||||||
var msgFut = sendMessages(sock)
|
|
||||||
msgFut.callback =
|
|
||||||
proc () =
|
|
||||||
closeSocket(sock)
|
|
||||||
|
|
||||||
proc readMessages(client: TAsyncFD) {.async.} =
|
proc readMessages(client: TAsyncFD) {.async.} =
|
||||||
while true:
|
while true:
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ discard """
|
||||||
import asyncio, asyncdispatch, asyncnet
|
import asyncio, asyncdispatch, asyncnet
|
||||||
|
|
||||||
proc main {.async.} =
|
proc main {.async.} =
|
||||||
proc f: PFuture[int] {.async.} =
|
proc f: Future[int] {.async.} =
|
||||||
discard
|
discard
|
||||||
echo 1
|
echo 1
|
||||||
discard
|
discard
|
||||||
|
|
@ -24,7 +24,7 @@ proc main {.async.} =
|
||||||
echo x
|
echo x
|
||||||
echo 3
|
echo 3
|
||||||
|
|
||||||
proc g: PFuture[int] {.async.} =
|
proc g: Future[int] {.async.} =
|
||||||
discard
|
discard
|
||||||
echo 4
|
echo 4
|
||||||
discard
|
discard
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue