# HG changeset patch
# User Matthew Wild <mwild1@gmail.com>
# Date 1376304627 -3600
# Node ID 2c98061b6b1effa1fed1b657f821e9318dc1ccf0
# Parent  959163e4d6311a60eae785ada43c23b13b8d37d3
util.async: runner: Fix check for new state to recognise transition to 'waiting'

diff -r 959163e4d631 -r 2c98061b6b1e util/async.lua
--- 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