-
Notifications
You must be signed in to change notification settings - Fork 116
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
Transaction resubmitted if WS connection times out #156
Comments
This is a kind of all or nothing approach I'm afraid. The transaction is submitted and the lib is waiting for a status update, and probably the proxy in front of the node is cleaning up the connections after a certain timeout. A keep-alive is also not possible because the execution is blocked until a new message is received (this will need a whole different async implementation) I could make the reconnect optional though, so you will have more control when a disconnect takes place. Also if you omit the |
As a workaround, I'm calling substrate.websocket.ping() every X seconds on a different thread, and it seems to work keeping the websocket alive |
That is interesting, I wouldn't expect that would work.. Thanks for sharing |
After submitting a transaction and waiting for inclusion, if the transaction takes longer than the WS timeout, the WS connection is closed which triggers a reconnection attempt. However, the author_submitAndWatchExtrinsic is also reattempted, leading to the same transaction being sent (with the same nonce) and failing.
Would it be possible to implement some sort of keep-alive messages to the WS during subscriptions, or alternatively make it so only the "watch" part is retried, not the "submit"?
The text was updated successfully, but these errors were encountered: