net.server_event: Return "quitting" on loop exit to be compatible with net.server_sel...
[prosody.git] / prosody
diff --git a/prosody b/prosody
index 7f69e085bdcb8408536b9961fdab455e5f92b3a3..6df7428b51c90498c054e7ab27057c0b898a3d0b 100755 (executable)
--- a/prosody
+++ b/prosody
@@ -177,8 +177,9 @@ function init_global_state()
        -- Load SSL settings from config, and create a ctx table
        local global_ssl_ctx = rawget(_G, "ssl") and config.get("*", "core", "ssl");
        if global_ssl_ctx then
-               local default_ssl_ctx = { mode = "server", protocol = "sslv23", capath = "/etc/ssl/certs", verify = "none"; };
+               local default_ssl_ctx = { mode = "server", protocol = "sslv23", capath = "/etc/ssl/certs", verify = "none", options = "no_sslv2"; };
                setmetatable(global_ssl_ctx, { __index = default_ssl_ctx });
+               prosody.global_ssl_ctx = global_ssl_ctx;
        end
 
        local cl = require "net.connlisteners";
@@ -302,7 +303,7 @@ end
 function loop()
        -- Error handler for errors that make it this far
        local function catch_uncaught_error(err)
-               if type(err) == "string" and err:match("%d*: interrupted!$") then
+               if type(err) == "string" and err:match("interrupted!$") then
                        return "quitting";
                end