diff --git a/doc/ftp.html b/doc/ftp.html
index 3f23a4a..091c88f 100644
--- a/doc/ftp.html
+++ b/doc/ftp.html
@@ -86,7 +86,6 @@ the FTP module:
- PASSWORD: default anonymous password.
-
- PORT: default port used for the control connection;
- TIMEOUT: sets the timeout for all I/O operations;
- USER: default anonymous user;
diff --git a/src/ftp.lua b/src/ftp.lua
index 11798ad..bd528ca 100644
--- a/src/ftp.lua
+++ b/src/ftp.lua
@@ -23,7 +23,7 @@ local _M = socket.ftp
-- timeout in seconds before the program gives up on a connection
_M.TIMEOUT = 60
-- default port for ftp service
-_M.PORT = 21
+local PORT = 21
-- this is the default anonymous password. used when no password is
-- provided in url. should be changed to your e-mail.
_M.USER = "ftp"
@@ -35,7 +35,7 @@ _M.PASSWORD = "anonymous@anonymous.org"
local metat = { __index = {} }
function _M.open(server, port, create)
- local tp = socket.try(tp.connect(server, port or _M.PORT, _M.TIMEOUT, create))
+ local tp = socket.try(tp.connect(server, port or PORT, _M.TIMEOUT, create))
local f = base.setmetatable({ tp = tp }, metat)
-- make sure everything gets closed in an exception
f.try = socket.newtry(function() f:close() end)