Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor the kraken module to automatically re-connect on errors
In order to be able to re-connect on certain errors, we model connection errors separately from parsing errors. We also change the API of the whole module to no longer forward all errors to the subscribers but instead, only update the subscribers with either a latest rate or a permanent failure in case we exhausted all our options to re-connect the websocket. To model all of this properly, we introduce to sub-modules so that each submodule can have their own `Error` type. Resolves #297.
- Loading branch information