You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I spent a good part of today debugging something that I think I would describe as a bit of footgun. To get straight to the point, consider the following code:
In this code, self.event_source is a gloo_net::eventsource::futures::EventSource, however the returned stream just returns a ConnectionError when it is pulled. I didn't fully get to the bottom of this, however, it seems that self.event_source is dropped after this function returns, which is either disconnecting the event handlers or closing the connection.
I am sure that my sloppiness is partly to blame here, however, I am used to Rust preventing these sorts of footguns. Is there anything that can be done to improve this?
The text was updated successfully, but these errors were encountered:
I spent a good part of today debugging something that I think I would describe as a bit of footgun. To get straight to the point, consider the following code:
In this code,
self.event_source
is agloo_net::eventsource::futures::EventSource
, however the returned stream just returns aConnectionError
when it is pulled. I didn't fully get to the bottom of this, however, it seems thatself.event_source
is dropped after this function returns, which is either disconnecting the event handlers or closing the connection.I am sure that my sloppiness is partly to blame here, however, I am used to Rust preventing these sorts of footguns. Is there anything that can be done to improve this?
The text was updated successfully, but these errors were encountered: