changeset 4551:b92147edd172

mod_storage_xmlarchive: Workaround for #1646 (util.async bug with Lua 5.1)
author Kim Alvefur <zash@zash.se>
date Mon, 26 Apr 2021 02:49:06 +0200
parents 0befc680970b
children c87181a98f29
files mod_storage_xmlarchive/mod_storage_xmlarchive.lua
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mod_storage_xmlarchive/mod_storage_xmlarchive.lua	Sun Apr 25 17:09:22 2021 +0200
+++ b/mod_storage_xmlarchive/mod_storage_xmlarchive.lua	Mon Apr 26 02:49:06 2021 +0200
@@ -132,7 +132,9 @@
 end
 
 local function get_nexttick()
-	if async.ready() then
+	-- COMPAT util.async under Lua 5.1 runs into problems trying to yield across
+	-- pcall barriers. Workaround for #1646
+	if _VERSION ~= "Lua 5.1" and async.ready() then
 		return function ()
 			-- slow down
 			local wait, done = async.waiter();