Skip to content

Commit a56c2ea

Browse files
Fix runtime checks for RSocketRequestHandlerBuilder (#119)
1 parent 3e6ab7b commit a56c2ea

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

rsocket-core/src/commonMain/kotlin/io/rsocket/kotlin/RSocketRequestHandler.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,22 +34,22 @@ class RSocketRequestHandlerBuilder internal constructor() {
3434
}
3535

3636
public fun fireAndForget(block: (suspend RSocket.(payload: Payload) -> Unit)) {
37-
check(metadataPush == null) { "Fire and Forget handler already configured" }
37+
check(fireAndForget == null) { "Fire and Forget handler already configured" }
3838
fireAndForget = block
3939
}
4040

4141
public fun requestResponse(block: (suspend RSocket.(payload: Payload) -> Payload)) {
42-
check(metadataPush == null) { "Request Response Push handler already configured" }
42+
check(requestResponse == null) { "Request Response handler already configured" }
4343
requestResponse = block
4444
}
4545

4646
public fun requestStream(block: (RSocket.(payload: Payload) -> Flow<Payload>)) {
47-
check(metadataPush == null) { "Request Stream handler already configured" }
47+
check(requestStream == null) { "Request Stream handler already configured" }
4848
requestStream = block
4949
}
5050

5151
public fun requestChannel(block: (RSocket.(payloads: Flow<Payload>) -> Flow<Payload>)) {
52-
check(metadataPush == null) { "Request Channel handler already configured" }
52+
check(requestChannel == null) { "Request Channel handler already configured" }
5353
requestChannel = block
5454
}
5555

0 commit comments

Comments
 (0)