Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(trade): Spawn trade execution in dedicated task #2030

Merged
merged 6 commits into from
Feb 15, 2024

Conversation

holzeis
Copy link
Contributor

@holzeis holzeis commented Feb 13, 2024

If the trade execution takes longer than 30 seconds the http request times out and the thread gets killed.

However, the spawned blocking thread to propose the dlc channel is finishing and sending the offer message. That leads to the coordinator sending the dlc message without updating the 10101 meta data (e.g. creating the position, updating order, etc.)

This also applies to the renew and close position flows.

Note, this is not fixing the issue of why proposing a dlc channel would take such a long time, but will fix the issue that the user may end up in a broken state.

Simulator.Screen.Recording.-.iPhone.13.Pro.-.2024-02-14.at.14.19.44.mp4

@holzeis holzeis self-assigned this Feb 13, 2024
@holzeis holzeis linked an issue Feb 13, 2024 that may be closed by this pull request
@holzeis holzeis force-pushed the fix/spawn-task-when-executing-trade branch 5 times, most recently from 21d105b to 200bae9 Compare February 15, 2024 09:47
Copy link
Contributor

@bonomat bonomat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -7,12 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

- Fix(validation): Show correct max counterparty collateral in validation message.
- Fix(trade): Spawn dedicated tokio task when executing trade
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: I would have mentioned what problem was fixed, not how.

@holzeis holzeis force-pushed the fix/spawn-task-when-executing-trade branch from 200bae9 to 39f599f Compare February 15, 2024 10:04
@holzeis holzeis added this pull request to the merge queue Feb 15, 2024
Merged via the queue into main with commit d4f4e2b Feb 15, 2024
19 checks passed
@holzeis holzeis deleted the fix/spawn-task-when-executing-trade branch February 15, 2024 10:19
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.

Trade execution thread is killed after timeout
2 participants