aboutsummaryrefslogtreecommitdiffstats
path: root/net/server.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2008-10-22 17:27:40 +0100
committerMatthew Wild <mwild1@gmail.com>2008-10-22 17:27:40 +0100
commitd510d54b2809b31bcbbc1bcbbe461fc7b5f91a41 (patch)
tree2ce95a47befbd6266af67ee1cecab6f4a0af03ca /net/server.lua
parent288aaa38ead4996a7a8a3b0cd64aaf0a1505f18f (diff)
downloadprosody-d510d54b2809b31bcbbc1bcbbe461fc7b5f91a41.tar.gz
prosody-d510d54b2809b31bcbbc1bcbbe461fc7b5f91a41.zip
server.lua should degrade gracefully when LuaSec not present
Diffstat (limited to 'net/server.lua')
-rw-r--r--net/server.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/server.lua b/net/server.lua
index 0ca6d17c..1661ba00 100644
--- a/net/server.lua
+++ b/net/server.lua
@@ -43,7 +43,7 @@ local out_error = print;
--// extern libs //--
-local luasec = require "ssl"
+local luasec = select(2, pcall(require, "ssl"))
local luasocket = require "socket"
--// extern lib methods //--
@@ -722,7 +722,7 @@ addserver = function( listeners, port, addr, mode, sslctx ) -- this function
else
for name, func in pairs( listeners ) do
if type( func ) ~= "function" then
- err = "invalid listener function"
+ --err = "invalid listener function"
break
end
end