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

Only consider pending_timeout_sec if it is set #957

Closed

Conversation

ok300
Copy link
Contributor

@ok300 ok300 commented Apr 30, 2024

This PR uses tokio::select with a conditional tokio::sleep, which allows us to conditionally sleep.

If pending_timeout_sec is set, the first of send_payment, sleep will return. So if the timeout occurs first, the method will return.

If pending_timeout_sec is not set, it will only execute send_payment, because the second branch of tokio::select is ignored.

@ok300 ok300 requested a review from dangeross April 30, 2024 09:58
@dangeross
Copy link
Collaborator

I think this can be closed because tokio::select doesn't fulfil the intension of completing the payment branch timeout or not.

@ok300
Copy link
Contributor Author

ok300 commented May 14, 2024

Correct. I forgot to close this as I was iterating through fixes.

Superseded by #958 .

@ok300 ok300 closed this May 14, 2024
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.

2 participants