icewind1991 / steam-vent

Interact with the Steam network via rust
19 stars 11 forks source link

[Bug?] Heartbeats run forever even after failure #27

Closed johnpyp closed 3 weeks ago

johnpyp commented 3 weeks ago

Currently, even if the connection's ws pipe breaks or the heartbeat is otherwise failing, it will run forever in the background and spit out error traces (you can easily test this just by toggling off ethernet/wifi until the websocket heartbeat times-out, at which point it's fully broken).

It would be nice to handle this error either with a state that unambiguously marks the Connection as "broken" and unusable, and/or potentially implement an automatic reconnect. Similarly, handling the disconnect / logoff events from Steam would be great for this kind of automatic reconnect feature.

johnpyp commented 3 weeks ago

Actually, I see this is mostly being discussed already in https://github.com/icewind1991/steam-vent/issues/20, so I'll close this.