summary refs log tree commit diff stats
path: root/lib/pure
diff options
context:
space:
mode:
authorLuca <acidvertigo@users.noreply.github.com>2015-06-27 14:40:44 +0200
committerLuca <acidvertigo@users.noreply.github.com>2015-06-27 14:40:44 +0200
commit88ae4c18593c61ed1c67d074cee373226c41ab32 (patch)
tree6701ee08ed5aec64ad2b643ef1b5fe7c864ba1ce /lib/pure
parent40a4a393740e3cf72dd37a243d5b72d7cde7f721 (diff)
downloadNim-88ae4c18593c61ed1c67d074cee373226c41ab32.tar.gz
Remove redundant 220 check
Diffstat (limited to 'lib/pure')
-rw-r--r--lib/pure/asyncftpclient.nim7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/pure/asyncftpclient.nim b/lib/pure/asyncftpclient.nim
index c3545ada8..979b0d649 100644
--- a/lib/pure/asyncftpclient.nim
+++ b/lib/pure/asyncftpclient.nim
@@ -81,11 +81,10 @@ proc connect*(ftp: AsyncFtpClient) {.async.} =
     reply = await ftp.expectReply()
 
   # Handle 220 messages from the server
-  if reply.startsWith("220"):
+  assertReply(reply, "220")
+  while reply.continuesWith("-", 3): # handle multiline 220 message
     assertReply(reply, "220")
-    while reply.continuesWith("-", 3): # handle multiline 220 message
-      assertReply(reply, "220")
-      reply = await ftp.expectReply()
+    reply = await ftp.expectReply()
 
   if ftp.user != "":
     assertReply(await(ftp.send("USER " & ftp.user)), "230", "331")
'>^
1d00f7f9d ^


505571f31 ^

1d00f7f9d ^


505571f31 ^
42bac5242 ^


b45483f86 ^
d93749b17 ^
517312467 ^

1d00f7f9d ^
517312467 ^


e5aefbd1d ^
911551aae ^
6a94599d6 ^




ae5a4cea9 ^
363b1c0a4 ^
1d00f7f9d ^





8f6a275f4 ^
fbe7bf3c8 ^
1d00f7f9d ^

c60916a2a ^
a01fd5e93 ^
aa0a9dd78 ^
a01fd5e93 ^
aa0a9dd78 ^
c60916a2a ^
308710c1e ^



2e5c75973 ^
308710c1e ^







cf323104f ^


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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92