summary refs log tree commit diff stats
path: root/lib/pure
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2018-06-07 10:40:50 +0200
committerGitHub <noreply@github.com>2018-06-07 10:40:50 +0200
commite67eddc91b5e06039498b337763acf718d436aae (patch)
tree2b1ad43c6e39ad10182dc1423df2c7001716b274 /lib/pure
parent3a6b1f0ba0525a4cf86c854d7bd4d9fc048c59e5 (diff)
parent722462ae299775a65f5f8204fac7bc47611568db (diff)
downloadNim-e67eddc91b5e06039498b337763acf718d436aae.tar.gz
Merge pull request #7822 from data-man/fix_2753
Fixes #2753
Diffstat (limited to 'lib/pure')
-rw-r--r--lib/pure/net.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/pure/net.nim b/lib/pure/net.nim
index bf5f3f57e..cac10d11c 100644
--- a/lib/pure/net.nim
+++ b/lib/pure/net.nim
@@ -1149,7 +1149,7 @@ proc waitFor(socket: Socket, waited: var float, timeout, size: int,
           return 1
         let sslPending = SSLPending(socket.sslHandle)
         if sslPending != 0:
-          return sslPending
+          return min(sslPending, size)
 
     var startTime = epochTime()
     let selRet = select(socket, timeout - int(waited * 1000.0))
documentation improvements' href='/ahoang/Nim/commit/install.txt?h=devel&id=9387913b734e1a8f4c90acdfcbdc7f92a9892244'>9387913b7 ^
db4f617af ^




053309e60 ^

a58a2f382 ^

db4f617af ^








ff4a69b62 ^

db4f617af ^


300430fbb ^
e27e873b7 ^





1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70