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

added timeout in accept_friend #154

Open
wants to merge 2 commits into
base: stable
Choose a base branch
from
Open

added timeout in accept_friend #154

wants to merge 2 commits into from

Conversation

gfdb
Copy link

@gfdb gfdb commented Aug 5, 2021

The Client.accept_friend method calls the Client.wait_for method without any timeout parameter. As a result, when asyncio.wait_for is called in Client.wait_for, timeout = None is passed which causes a block until the future check=lambda f: f.id == user_id completes. This pull request just adds a 60 second timeout so that, in the event that the future never completes, accept_friend does not block.

@gfdb
Copy link
Author

gfdb commented Aug 5, 2021

Changed timeout default from 60 seconds to None to be backwards compatible with existing implementations of the method. Also, made timeout a parameter of Client.accept_friend. It is a parameter of Client.wait_for and asyncio.wait_for so it is a parameter that you should be able to set when calling Client.accept_friend.

Not-Bay added a commit to Not-Bay/fortnitepy that referenced this pull request Nov 18, 2023
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