Skip to content

Commit a7000fa

Browse files
committed
Ensure Subscriber is removed from sendingSubscriptions
Closes gh-961 Signed-off-by: Rossen Stoyanchev <[email protected]>
1 parent d047c59 commit a7000fa

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

rsocket-core/src/main/java/io/rsocket/core/RSocketResponder.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -433,10 +433,8 @@ protected void hookOnError(Throwable throwable) {
433433

434434
@Override
435435
protected void hookOnComplete() {
436-
if (isEmpty) {
437-
if (sendingSubscriptions.remove(streamId, this)) {
438-
sendProcessor.onNext(PayloadFrameCodec.encodeComplete(allocator, streamId));
439-
}
436+
if (sendingSubscriptions.remove(streamId, this) && isEmpty) {
437+
sendProcessor.onNext(PayloadFrameCodec.encodeComplete(allocator, streamId));
440438
}
441439
}
442440
};

0 commit comments

Comments
 (0)