diff options
author | Diego Nehab <diego@tecgraf.puc-rio.br> | 2006-03-13 07:16:39 +0000 |
---|---|---|
committer | Diego Nehab <diego@tecgraf.puc-rio.br> | 2006-03-13 07:16:39 +0000 |
commit | 6248b915cba040a3d04fedd100637e1465a43cc7 (patch) | |
tree | d87bde69c65934524b2102f47ac48cf28897bf80 /src/ftp.lua | |
parent | 00e74c304c7aa917fffd1e5b7adedfa05727333c (diff) | |
download | luasocket-6248b915cba040a3d04fedd100637e1465a43cc7.tar.gz luasocket-6248b915cba040a3d04fedd100637e1465a43cc7.tar.bz2 luasocket-6248b915cba040a3d04fedd100637e1465a43cc7.zip |
Fixing bugs...
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) |