diff options
author | Araq <rumpf_a@web.de> | 2014-04-03 22:40:34 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2014-04-03 22:40:34 +0200 |
commit | 160933f9def1467db4449ab078d0f2d662504cc8 (patch) | |
tree | 92021f17e1f58f963a61c1a9fbbbd9a285dd584d /lib/pure/asyncnet.nim | |
parent | 325dd44e81b44814986f5d586f1934a814c1b148 (diff) | |
parent | 4399895d2e08c7a0ae711c92d025edf25c4d9b16 (diff) | |
download | Nim-160933f9def1467db4449ab078d0f2d662504cc8.tar.gz |
Merge branch 'devel' of https://github.com/Araq/Nimrod into devel
Diffstat (limited to 'lib/pure/asyncnet.nim')
-rw-r--r-- | lib/pure/asyncnet.nim | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/pure/asyncnet.nim b/lib/pure/asyncnet.nim index 24651b08c..748566aaa 100644 --- a/lib/pure/asyncnet.nim +++ b/lib/pure/asyncnet.nim @@ -116,7 +116,8 @@ proc recvLine*(socket: PAsyncSocket): PFuture[string] {.async.} = if c == "\r": c = await recv(socket, 1, MSG_PEEK) if c.len > 0 and c == "\L": - discard await recv(socket, 1) + let dummy = await recv(socket, 1) + assert dummy == "\L" addNLIfEmpty() return elif c == "\L": @@ -148,7 +149,7 @@ when isMainModule: TestCases = enum HighClient, LowClient, LowServer - const test = LowServer + const test = HighClient when test == HighClient: proc main() {.async.} = |