nash-io / openlimits

A Rust high performance cryptocurrency trading API with support for multiple exchanges and language wrappers.
http://openlimits.io
BSD 2-Clause "Simplified" License
275 stars 44 forks source link

Handling disconnection #146

Closed notdanilo closed 3 years ago

notdanilo commented 3 years ago

This PR introduces:

  1. An SocketError message sent to the subscriber when it loses its connection.
  2. An automatic reconnection wrapper called ReconnectableWebsocket.

The functionality is ready, but the API is not ideal. Making it so will require a major refactoring over the underlying implementation.

Ejhfast commented 3 years ago

Just had a quick look at the full PR and looks good to me overall! Would like to test it a bit, then may have more feedback