diff --git a/TODO b/TODO index 054e5f3..6612b45 100644 --- a/TODO +++ b/TODO @@ -1,3 +1,4 @@ +make sure all modules that can use socket.newtry make select interrupt safe adicionar exemplos de expansão: pipe, local, named pipe 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) local tp = socket.try(tp.connect(server or SERVER, port or PORT, TIMEOUT)) local s = setmetatable({tp = tp}, metat) -- make sure tp is closed if we get an exception - local try = socket.newtry(function() s:close() end) + s.try = socket.newtry(function() s:close() end) return s end