Skip to content

Commit

Permalink
final tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
pkwarren committed Oct 18, 2023
1 parent fdcd426 commit 0e76254
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ interface ClientOnlyStreamInterface<Input, Output> {
* Receive a single response and close the stream.
*
* @return the single response [Output].
* @throws ConnectException If an error occurs making the call or processing the response.
*/
suspend fun receiveAndClose(): Output

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ internal class ClientOnlyStream<Input, Output>(
try {
messageStream.sendClose()
val message = resultChannel.receive()
val additionalMessage = resultChannel.tryReceive()
val additionalMessage = resultChannel.receiveCatching()
if (additionalMessage.isSuccess) {
throw ConnectException(code = Code.UNKNOWN, message = "unary stream has multiple messages")
}
Expand Down

0 comments on commit 0e76254

Please sign in to comment.