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 1805e5b2063fcdebbab263473ac41ec843efd22c..6df7428b51c90498c054e7ab27057c0b898a3d0b 100755 (executable)
--- a/prosody
+++ b/prosody
@@ -179,6 +179,7 @@ function init_global_state()
        if global_ssl_ctx then
                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