Skip to content

Commit 0e76254

Browse files
committed
final tweaks
1 parent fdcd426 commit 0e76254

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

library/src/main/kotlin/com/connectrpc/ClientOnlyStreamInterface.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ interface ClientOnlyStreamInterface<Input, Output> {
3030
* Receive a single response and close the stream.
3131
*
3232
* @return the single response [Output].
33+
* @throws ConnectException If an error occurs making the call or processing the response.
3334
*/
3435
suspend fun receiveAndClose(): Output
3536

library/src/main/kotlin/com/connectrpc/impl/ClientOnlyStream.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ internal class ClientOnlyStream<Input, Output>(
3434
try {
3535
messageStream.sendClose()
3636
val message = resultChannel.receive()
37-
val additionalMessage = resultChannel.tryReceive()
37+
val additionalMessage = resultChannel.receiveCatching()
3838
if (additionalMessage.isSuccess) {
3939
throw ConnectException(code = Code.UNKNOWN, message = "unary stream has multiple messages")
4040
}

0 commit comments

Comments
 (0)