From 7c49bbb6094e079d7d6ec88f90479c2cff03dc25 Mon Sep 17 00:00:00 2001 From: Marek Langiewicz Date: Mon, 23 Nov 2020 00:22:33 +0100 Subject: [PATCH] Fix runtime checks for RSocketRequestHandlerBuilder --- .../kotlin/io/rsocket/kotlin/RSocketRequestHandler.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rsocket-core/src/commonMain/kotlin/io/rsocket/kotlin/RSocketRequestHandler.kt b/rsocket-core/src/commonMain/kotlin/io/rsocket/kotlin/RSocketRequestHandler.kt index d7f19a31d..43d195234 100644 --- a/rsocket-core/src/commonMain/kotlin/io/rsocket/kotlin/RSocketRequestHandler.kt +++ b/rsocket-core/src/commonMain/kotlin/io/rsocket/kotlin/RSocketRequestHandler.kt @@ -34,22 +34,22 @@ class RSocketRequestHandlerBuilder internal constructor() { } public fun fireAndForget(block: (suspend RSocket.(payload: Payload) -> Unit)) { - check(metadataPush == null) { "Fire and Forget handler already configured" } + check(fireAndForget == null) { "Fire and Forget handler already configured" } fireAndForget = block } public fun requestResponse(block: (suspend RSocket.(payload: Payload) -> Payload)) { - check(metadataPush == null) { "Request Response Push handler already configured" } + check(requestResponse == null) { "Request Response handler already configured" } requestResponse = block } public fun requestStream(block: (RSocket.(payload: Payload) -> Flow)) { - check(metadataPush == null) { "Request Stream handler already configured" } + check(requestStream == null) { "Request Stream handler already configured" } requestStream = block } public fun requestChannel(block: (RSocket.(payloads: Flow) -> Flow)) { - check(metadataPush == null) { "Request Channel handler already configured" } + check(requestChannel == null) { "Request Channel handler already configured" } requestChannel = block }