irc icon indicating copy to clipboard operation
irc copied to clipboard

Allow marking ClientStream as terminated

Open quietvoid opened this issue 11 months ago • 0 comments

I'm not sure if this is the right way to go about things but it's how my current code is designed and it has been working fine for me.

That way streams can be individually set terminated manually to avoid panics when using select_next_some(). Along with select! and futures::future::select_all

Example scenario:

  • A client receives PingTimeout
  • sends QUIT
  • sets the stream as terminated

There might be a better way to react to timeouts but having the ability to set terminated should still be useful.

quietvoid avatar Feb 08 '25 16:02 quietvoid