Mercurial > prosody-modules
comparison mod_auth_external/mod_auth_external.lua @ 3660:11cd6e034fd3
mod_auth_external: Improve error handling when non-blocking mode used without libevent
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Fri, 30 Aug 2019 13:28:30 +0100 |
| parents | c458f940b011 |
| children |
comparison
equal
deleted
inserted
replaced
| 3659:bb8a6df5ecba | 3660:11cd6e034fd3 |
|---|---|
| 28 "Config error: external_auth_protocol must be 'ejabberd' or 'generic'"); | 28 "Config error: external_auth_protocol must be 'ejabberd' or 'generic'"); |
| 29 assert(not host:find(":"), "Invalid hostname"); | 29 assert(not host:find(":"), "Invalid hostname"); |
| 30 | 30 |
| 31 | 31 |
| 32 if not blocking then | 32 if not blocking then |
| 33 assert(server.event, "External auth non-blocking mode requires libevent installed and enabled"); | |
| 33 log("debug", "External auth in non-blocking mode, yay!") | 34 log("debug", "External auth in non-blocking mode, yay!") |
| 34 waiter, guard = async.waiter, async.guarder(); | 35 waiter, guard = async.waiter, async.guarder(); |
| 35 elseif auth_processes > 1 then | 36 elseif auth_processes > 1 then |
| 36 log("warn", "external_auth_processes is greater than 1, but we are in blocking mode - reducing to 1"); | 37 log("warn", "external_auth_processes is greater than 1, but we are in blocking mode - reducing to 1"); |
| 37 auth_processes = 1; | 38 auth_processes = 1; |
