diff options
Diffstat (limited to 'src/ftp.lua')
-rw-r--r-- | src/ftp.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ftp.lua b/src/ftp.lua index 5e1b685..d3a48d4 100644 --- a/src/ftp.lua +++ b/src/ftp.lua | |||
@@ -116,10 +116,11 @@ function metat.__index:send(sendt) | |||
116 | if not self.pasvt then self:portconnect() end | 116 | if not self.pasvt then self:portconnect() end |
117 | -- get the sink, source and step for the transfer | 117 | -- get the sink, source and step for the transfer |
118 | local step = sendt.step or ltn12.pump.step | 118 | local step = sendt.step or ltn12.pump.step |
119 | local readt = {self.tp.c} | ||
119 | local checkstep = function(src, snk) | 120 | local checkstep = function(src, snk) |
120 | -- check status in control connection while downloading | 121 | -- check status in control connection while downloading |
121 | local readyt = socket.select(readt, nil, 0) | 122 | local readyt = socket.select(readt, nil, 0) |
122 | if readyt[tp] then self.try(self.tp:check("2..")) end | 123 | if readyt[tp] then code = self.try(self.tp:check("2..")) end |
123 | return step(src, snk) | 124 | return step(src, snk) |
124 | end | 125 | end |
125 | local sink = socket.sink("close-when-done", self.data) | 126 | local sink = socket.sink("close-when-done", self.data) |