Open ALiwoto opened 6 months ago
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.
@blaggacao i think this PR should be implemented, i have an issue sometimes the server got internet issue and we don't have any problem regarding how to connect using timeout or context cancelled.
This pull request adds a new method called
ConnectWithTimeout
to support having a timeout set when connecting to whatsapp. Thiscontext.Conext
is later on passed to fs and is used when connecting (previously, we have been usingcontext.Backgound()
for the fs). Can also usecontext.Background()
if we do not want any timeout.