aboutsummaryrefslogtreecommitdiffstats
path: root/net/server.lua
diff options
context:
space:
mode:
authorMatthias Diener <devnull@localhost>2009-07-23 01:29:41 +0100
committerMatthias Diener <devnull@localhost>2009-07-23 01:29:41 +0100
commit88ed977abb7d1fd8f0cfb41ddf2faadfbf12fd9b (patch)
treed8c96d77ece37576109086bea37559aa6c17abde /net/server.lua
parent3be56d2e6e4be815e5b844513ab9791cf2ea7773 (diff)
downloadprosody-88ed977abb7d1fd8f0cfb41ddf2faadfbf12fd9b.tar.gz
prosody-88ed977abb7d1fd8f0cfb41ddf2faadfbf12fd9b.zip
net.server: Continue to initialise port listener even when SSL errors occur
Diffstat (limited to 'net/server.lua')
-rw-r--r--net/server.lua14
1 files changed, 8 insertions, 6 deletions
diff --git a/net/server.lua b/net/server.lua
index da65fce2..e31333e2 100644
--- a/net/server.lua
+++ b/net/server.lua
@@ -172,22 +172,24 @@ wrapserver = function( listeners, socket, ip, serverport, pattern, sslctx, maxco
local ssl = false
if sslctx then
+ ssl = true
if not ssl_newcontext then
- return nil, "luasec not found"
+ out_error "luasec not found"
+ ssl = false
end
if type( sslctx ) ~= "table" then
out_error "server.lua: wrong server sslctx"
- return nil, "wrong server sslctx"
+ ssl = false
end
sslctx, err = ssl_newcontext( sslctx )
if not sslctx then
err = err or "wrong sslctx parameters"
out_error( "server.lua: ", err )
- return nil, err
+ ssl = false
end
- ssl = true
- else
- out_put("server.lua: ", "ssl not enabled on ", serverport);
+ end
+ if not ssl then
+ out_put("server.lua: ", "ssl not enabled on ", serverport);
end
local accept = socket.accept