diff mod_storage_xmlarchive/mod_storage_xmlarchive.lua @ 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 591c643d55b2
children 072d078be095
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();