Diff

util/async.lua @ 8615:e77b37de482e

util.async: Behaviour change: continue to process queued items after errors
author Matthew Wild <mwild1@gmail.com>
date Sat, 17 Mar 2018 14:54:48 +0000
parent 8613:dbb4788db8e3
child 8616:a15c891c6232
line wrap: on
line diff
--- a/util/async.lua	Sat Mar 17 11:47:07 2018 +0000
+++ b/util/async.lua	Sat Mar 17 14:54:48 2018 +0000
@@ -180,6 +180,9 @@
 		local handler = self.watchers[state];
 		if handler then handler(self, err); end
 	end
+	if n > 0 then
+		return self:run();
+	end
 	return true, state, n;
 end