Software /
code /
prosody
Comparison
util/async.lua @ 5791:2c98061b6b1e
util.async: runner: Fix check for new state to recognise transition to 'waiting'
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Mon, 12 Aug 2013 11:50:27 +0100 |
parent | 5790:959163e4d631 |
child | 5792:aac4c6147647 |
comparison
equal
deleted
inserted
replaced
5790:959163e4d631 | 5791:2c98061b6b1e |
---|---|
83 local ok, new_state = coroutine.resume(thread, input); | 83 local ok, new_state = coroutine.resume(thread, input); |
84 if not ok then | 84 if not ok then |
85 consumed, state, err = i, "ready", debug.traceback(thread, new_state); | 85 consumed, state, err = i, "ready", debug.traceback(thread, new_state); |
86 self.thread = nil; | 86 self.thread = nil; |
87 break; | 87 break; |
88 elseif state == "wait" then | 88 elseif new_state == "wait" then |
89 consumed, state = i, "waiting"; | 89 consumed, state = i, "waiting"; |
90 break; | 90 break; |
91 end | 91 end |
92 end | 92 end |
93 if not consumed then consumed = n; end | 93 if not consumed then consumed = n; end |