Software /
code /
prosody
Diff
util/helpers.lua @ 8411:a9e8523a5e73
util.helpers: Handle missing priorities, happens due to wildcard magic in net.http.server (fixes #1044)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 22 Nov 2017 02:34:42 +0100 |
parent | 7720:7166750fb963 |
child | 11059:ad89e3cc67b6 |
line wrap: on
line diff
--- a/util/helpers.lua Tue Nov 21 14:46:21 2017 +0100 +++ b/util/helpers.lua Wed Nov 22 02:34:42 2017 +0100 @@ -50,7 +50,7 @@ local handler_strings = {}; for i, handler in ipairs(handlers) do local upvals = debug.string_from_var_table(debug.get_upvalues_table(handler)); - handler_strings[i] = " "..priorities[handler]..": "..tostring(handler)..(upvals and ("\n "..upvals) or ""); + handler_strings[i] = " "..(priorities[handler] or "?")..": "..tostring(handler)..(upvals and ("\n "..upvals) or ""); end event_handler_arrays[event] = handler_strings; end