Skip to content

Allow marking ClientStream as terminated#272

Open
quietvoid wants to merge 1 commit intoaatxe:developfrom
quietvoid:stream_terminated
Open

Allow marking ClientStream as terminated#272
quietvoid wants to merge 1 commit intoaatxe:developfrom
quietvoid:stream_terminated

Conversation

@quietvoid
Copy link

@quietvoid quietvoid commented Feb 8, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments