Open niklasad1 opened 2 months ago
One idea offhand (but maybe not the best one!) is something like (I can't remember if I wrote this somewhere already):
DisconnectedWillReconnect
, then go back to 2, but wait until the connection count increments before trying to do anything with the data.So for a real example this might mean that we:
chainHead_v1_header(sub_id)
This should ensure that the follow subscription has reconnected at least once since we got the disconnected error, and isn't stale :)
_Originally posted by @lexnv in https://github.com/paritytech/subxt/pull/1505#discussion_r1584924860_
TLDR, when a re-connection occurs the poll order of "pending futures" should wait until
chainHead__follow
returns then fetch the updated subscription ID.Currently we have a hack to retry these a calls a few times.