-
Notifications
You must be signed in to change notification settings - Fork 85
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
Fix issue with listener not being removed when subscription is released #595
Conversation
@catostrophe any chance you can give this a look? Last related change was #528 , you're probably more familiar with this. |
Will look at it soon |
I should probably revert the changes to the demo before mergin |
topic <- Resource.eval(Topic[F, Option[V]]) | ||
_ <- Resource.eval(Log[F].info(s"Creating listener for channel: $channel")) | ||
listener = defaultListener(channel, topic, dispatcher) | ||
_ <- Resource.make { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I see that the dispatcher leaks because it's used in the listener implementation.
@@ -44,7 +44,7 @@ object PubSubDemo extends LoggerIOApp { | |||
pub1 = pubSub.publish(eventsChannel) | |||
pub2 = pubSub.publish(gamesChannel) | |||
} yield Stream( | |||
sub1.through(sink("#events")), | |||
sub1.take(1).through(sink("#events")), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure regarding leaving this in the demo. Can we have a test for dispatcher leakage instead?
Not sure if I have time to write a unit test for this in the coming weeks, I'm not intimately familiar with CE 3. So feel free to beat me to it. |
There was no test for it before so I think it's better than what we have now but ideally there should be a test for it. I created an issue so it is not forgotten #597 , will merge this now, thank you both! |
See #593