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

Add ConnectWithTimeout method to support having a timeout when connecting. #596

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

Conversation

ALiwoto
Copy link

@ALiwoto ALiwoto commented May 24, 2024

This pull request adds a new method called ConnectWithTimeout to support having a timeout set when connecting to whatsapp. This context.Conext is later on passed to fs and is used when connecting (previously, we have been using contect.Backgound() for the fs).
Can also use context.Background() if we do not want any timeout.

Signed-off-by: Aliwoto <aminnimaj@gmail.com>
…thod.

Signed-off-by: Aliwoto <aminnimaj@gmail.com>
@ALiwoto ALiwoto changed the title Add timeout support to Connect() methods. Add ConnectWithTimeout method to support having a timeout when connecting. May 24, 2024
@blaggacao
Copy link

Can you say a word or two about the motivation and concrete failure mode which triggered this?

I'm seeing timeout related issues and wonder if this was indirectly made to address a functionally equal failure mode as the one I observe.

I'm not currently using a timeout on the service, but when connecting to the whatsmeow service socket, I use a timeout of 15 seconds within the application. This seems to cause cascading issues some times.

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