-
Notifications
You must be signed in to change notification settings - Fork 43
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
Contract event listener stops receiving events #106
Comments
Happened again last night. Could someone please let us know what the correct steps are to help the SDK not lose connection to incoming events? |
Looks like something that might happen during a congested network perhaps. As such, I was unable to replicate, ran this script for almost 2hrs.
There is a function that you can call by doing |
We will try calling .reconnect() every hour and see if that resolves the issue. |
Can you try listening to events over 48 hours instead of 2 hours? It's not uncommon for it to work for a large portion of a day before the events stop coming through. As an FYI, the other issue I've reported is way more important to us: #104 (comment) |
Hi there.
Is it fair to say that the Harmony SDK should handle re-connects by itself when using the websocket API? See code below on how we listen for events on a smart contract. We've noticed at some point events stop coming through. We only deployed this yesterday, and it stopped overnight, so it may possibly be some kind of inactivity timeout?
Any guidance on options we should use to prevent timeouts, if needed, would be appreciated.
Thank you!
The text was updated successfully, but these errors were encountered: