Software /
code /
prosody
Changeset
1570:a46453758631
net.server: Continue to initialise port listener even when SSL errors occur
author | Matthias Diener |
---|---|
date | Thu, 23 Jul 2009 01:29:41 +0100 |
parents | 1568:b11bac42d56f |
children | 1571:063d7be32fdd |
files | net/server.lua |
diffstat | 1 files changed, 8 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/net/server.lua Wed Jul 22 21:35:41 2009 +0100 +++ b/net/server.lua Thu Jul 23 01:29:41 2009 +0100 @@ -172,22 +172,24 @@ 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