Prevent infinite loop on cancel when you hit the maxtransaction limit in controls - #856
Open
lunswor wants to merge 1 commit into
Open
Prevent infinite loop on cancel when you hit the maxtransaction limit in controls#856lunswor wants to merge 1 commit into
lunswor wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
If you hit the transaction limit a user has set in the client and try to cancel an order, you'll end up in an infinite loop of cancelling -> violation -> executable -> cancelling....
This patch allows cancels to still get through while not allowing any new orders to be placed and prevents the infinite cancel loop.
A successful cancel isn't a transaction so doesn't get counted, but a failed one does. We don't know which we're going to get back before we send it, so there's no way to only let through the cancels that are free.
It's slightly contradictory as this allows the MaxTransactionCount to exceed it's transaction limit and you might prefer the user handles this themselves so feel free to close if so.