You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
RSocketResponder does not remove Subscriber from sendingSubscriptions when response is empty #961
set isEmpty=false in hookOnNext, but there is no code to set it to true afterwards. sendingSubscriptions.remove(streamId, this) in hookOnComplete has no chance to be executed. cause the subscriber object cannot be recycle.
Why not put sendingSubscriptions.remove(streamId, this) into hookFinally?
It does look like sendingSubscriptions.remove should be called in hookOnComplete in any case. Perhaps the condition should be (isEmpty && sendingSubscriptions.remove(streamId, this)). WDYT @OlegDokuka ?
changed the title [-]There may be a memory leak issue in version 1.0.2[/-][+]RSocketResponder does not remove Subscriber from sendingSubscription when response is empty[/+]on Nov 19, 2020
changed the title [-]RSocketResponder does not remove Subscriber from sendingSubscription when response is empty[/-][+]RSocketResponder does not remove Subscriber from sendingSubscriptions when response is empty[/+]on Nov 19, 2020
Activity
linux-china commentedon Nov 19, 2020
Then link is:
rsocket-java/rsocket-core/src/main/java/io/rsocket/core/RSocketResponder.java
Line 402 in d047c59
or remove directly in hookOnComplete like logic for requestStream
rstoyanchev commentedon Nov 19, 2020
It does look like
sendingSubscriptions.removeshould be called inhookOnCompletein any case. Perhaps the condition should be(isEmpty && sendingSubscriptions.remove(streamId, this)). WDYT @OlegDokuka ?OlegDokuka commentedon Nov 19, 2020
Looks like a bug. We have to call remove inside hookOnNext for sure.
IsEmpty is an important flag and has to be there in order to prevent Next Complete frame followed by Complete frame
[-]There may be a memory leak issue in version 1.0.2[/-][+]RSocketResponder does not remove Subscriber from sendingSubscription when response is empty[/+][-]RSocketResponder does not remove Subscriber from sendingSubscription when response is empty[/-][+]RSocketResponder does not remove Subscriber from sendingSubscriptions when response is empty[/+]Ensure Subscriber is removed from sendingSubscriptions
Ensure Subscriber is removed from sendingSubscriptions