aboutsummaryrefslogtreecommitdiff
path: root/src/ftp.lua
diff options
context:
space:
mode:
Diffstat (limited to 'src/ftp.lua')
-rw-r--r--src/ftp.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ftp.lua b/src/ftp.lua
index 1c7ea71..4e2bb62 100644
--- a/src/ftp.lua
+++ b/src/ftp.lua
@@ -32,7 +32,7 @@ local metat = { __index = {} }
32 32
33function open(server, port) 33function open(server, port)
34 local tp = socket.try(tp.connect(server, port or PORT, TIMEOUT)) 34 local tp = socket.try(tp.connect(server, port or PORT, TIMEOUT))
35 local f = setmetat({ tp = tp }, metat) 35 local f = setmetatable({ tp = tp }, metat)
36 -- make sure everything gets closed in an exception 36 -- make sure everything gets closed in an exception
37 f.try = socket.newtry(function() f:close() end) 37 f.try = socket.newtry(function() f:close() end)
38 return f 38 return f