Fix executing queued commands in the order they are enqueued #75
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes #70. This was caused by the
Parser
trying to execute multiple commands at the same time when commands are already queued and a new command is queued from a success handler. When the second command was completed, it would no longer have a reference to the command and would bail out. This is a side effect that was introduced with #52, but the underlying flaw has been present for much longer. The fix ensures we only ever take one command from the queue and then wait for it to finish.Builds on top of #52
Supersedes / closes #74, thank you @elprawn
Resolves / closes #70