Skip to content

Prevent infinite loop on cancel when you hit the maxtransaction limit in controls - #856

Open
lunswor wants to merge 1 commit into
betcode-org:masterfrom
lunswor:maxtransactioncount-infinate-loop
Open

Prevent infinite loop on cancel when you hit the maxtransaction limit in controls#856
lunswor wants to merge 1 commit into
betcode-org:masterfrom
lunswor:maxtransactioncount-infinate-loop

Conversation

@lunswor

@lunswor lunswor commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant