Remove redundant 220 check
This commit is contained in:
parent
40a4a39374
commit
88ae4c1859
1 changed files with 3 additions and 4 deletions
|
|
@ -81,11 +81,10 @@ proc connect*(ftp: AsyncFtpClient) {.async.} =
|
||||||
reply = await ftp.expectReply()
|
reply = await ftp.expectReply()
|
||||||
|
|
||||||
# Handle 220 messages from the server
|
# Handle 220 messages from the server
|
||||||
if reply.startsWith("220"):
|
assertReply(reply, "220")
|
||||||
|
while reply.continuesWith("-", 3): # handle multiline 220 message
|
||||||
assertReply(reply, "220")
|
assertReply(reply, "220")
|
||||||
while reply.continuesWith("-", 3): # handle multiline 220 message
|
reply = await ftp.expectReply()
|
||||||
assertReply(reply, "220")
|
|
||||||
reply = await ftp.expectReply()
|
|
||||||
|
|
||||||
if ftp.user != "":
|
if ftp.user != "":
|
||||||
assertReply(await(ftp.send("USER " & ftp.user)), "230", "331")
|
assertReply(await(ftp.send("USER " & ftp.user)), "230", "331")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue