diff options
author | Diego Nehab <diego@tecgraf.puc-rio.br> | 2004-06-19 16:35:43 +0000 |
---|---|---|
committer | Diego Nehab <diego@tecgraf.puc-rio.br> | 2004-06-19 16:35:43 +0000 |
commit | 5dc5c3ebe8f111bba01762ca0f5edba912c4f0b9 (patch) | |
tree | e04797eecc079dfed9b4a9edcb5b04fac7088ecc | |
parent | cdae8c02ed79efec522408b95106dca028e30ebf (diff) | |
download | luasocket-5dc5c3ebe8f111bba01762ca0f5edba912c4f0b9.tar.gz luasocket-5dc5c3ebe8f111bba01762ca0f5edba912c4f0b9.tar.bz2 luasocket-5dc5c3ebe8f111bba01762ca0f5edba912c4f0b9.zip |
tiny bug...
-rw-r--r-- | TODO | 1 | ||||
-rw-r--r-- | src/smtp.lua | 2 |
2 files changed, 2 insertions, 1 deletions
@@ -1,3 +1,4 @@ | |||
1 | make sure all modules that can use socket.newtry | ||
1 | make select interrupt safe | 2 | make select interrupt safe |
2 | adicionar exemplos de expansão: pipe, local, named pipe | 3 | adicionar exemplos de expansão: pipe, local, named pipe |
3 | Add service name translation. | 4 | Add service name translation. |
diff --git a/src/smtp.lua b/src/smtp.lua index 70b511c..ac74205 100644 --- a/src/smtp.lua +++ b/src/smtp.lua | |||
@@ -106,7 +106,7 @@ function open(server, port) | |||
106 | local tp = socket.try(tp.connect(server or SERVER, port or PORT, TIMEOUT)) | 106 | local tp = socket.try(tp.connect(server or SERVER, port or PORT, TIMEOUT)) |
107 | local s = setmetatable({tp = tp}, metat) | 107 | local s = setmetatable({tp = tp}, metat) |
108 | -- make sure tp is closed if we get an exception | 108 | -- make sure tp is closed if we get an exception |
109 | local try = socket.newtry(function() s:close() end) | 109 | s.try = socket.newtry(function() s:close() end) |
110 | return s | 110 | return s |
111 | end | 111 | end |
112 | 112 | ||