Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Result in subscription sends a Complete message on error #744

Closed
Sytten opened this issue Dec 6, 2021 · 3 comments
Closed

Result in subscription sends a Complete message on error #744

Sytten opened this issue Dec 6, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@Sytten
Copy link

Sytten commented Dec 6, 2021

Expected Behavior

When creating a stream like impl Stream<Item = Result<i32>> and returning an Err, it should not send a Complete message as the stream might not be ended, just that it had an error.

Actual Behavior

The server sends a complete message, closing the subscription.
Screen Shot 2021-12-06 at 11 06 23 AM

Steps to Reproduce the Problem

  1. Create a subscription that returns a Result
  2. Return an Err
  3. The complete message is sent

Specifications

  • Version: Commit 3c6c933 (actix-v4 branch)
@Sytten Sytten added the bug Something isn't working label Dec 6, 2021
@sunli829
Copy link
Collaborator

sunli829 commented Dec 7, 2021

I think you are right, I shouldn't assume that the stream ends when it returns to Err. 😁

@sunli829
Copy link
Collaborator

sunli829 commented Dec 7, 2021

Released in v3.0.13

@Sytten
Copy link
Author

Sytten commented Dec 7, 2021

Nice I will be able to test once we update the actix v4 branch I guess.

@Sytten Sytten closed this as completed Mar 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants