Skip to content

Commit 64def74

Browse files
segabrielrobertroeser
authored andcommitted
Fixed sending complete signal for mono.empty() (#521)
1 parent 40d6543 commit 64def74

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,7 @@ private void handleRequestResponse(int streamId, Mono<Payload> response) {
302302
payload.release();
303303
return frame;
304304
})
305+
.switchIfEmpty(Mono.fromCallable(() -> Frame.PayloadFrame.from(streamId, FrameType.COMPLETE)))
305306
.doFinally(signalType -> sendingSubscriptions.remove(streamId))
306307
.subscribe(sendProcessor::onNext, t -> handleError(streamId, t));
307308
}

0 commit comments

Comments
 (0)