util/async.lua
changeset 5791 2c98061b6b1e
parent 5790 959163e4d631
child 5792 aac4c6147647
--- a/util/async.lua	Mon Aug 12 10:27:08 2013 +0100
+++ b/util/async.lua	Mon Aug 12 11:50:27 2013 +0100
@@ -85,7 +85,7 @@
 				consumed, state, err = i, "ready", debug.traceback(thread, new_state);
 				self.thread = nil;
 				break;
-			elseif state == "wait" then
+			elseif new_state == "wait" then
 				consumed, state = i, "waiting";
 				break;
 			end