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

[WIP] End the request not the response when dispose is called #10

Merged
merged 1 commit into from
Aug 17, 2017

Conversation

WyriHaximus
Copy link
Contributor

@WyriHaximus WyriHaximus commented Apr 4, 2017

Calling close on response will immediately close the connection, while calling end on the request will send any buffered messages to the other end and then close the connection.

Should aid with #9

  • Correctly end connection
  • Add tests

@WyriHaximus WyriHaximus changed the title End the request not the response when dispose is called [WIP] End the request not the response when dispose is called Apr 4, 2017
@WyriHaximus
Copy link
Contributor Author

@mbonneau Any idea how to test this?

@mbonneau
Copy link
Member

mbonneau commented Apr 4, 2017

I am now having seconds thoughts about whether the connection should be closed when the subscriber count goes from 1 -> 0.

It may be a valid use case to only send - or to dispose of a MessageSubject subscription while still sending.

Maybe this could be an option? or maybe it would be the user's responsibility to publish the connection so it doesn't dispose if they want to keep it open?

@WyriHaximus
Copy link
Contributor Author

Personally in my use case I want it closed. And I can't think of a use case where I would want to keep it open. But making it configurable is a good way to go about this 👍

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.

2 participants