Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
buildbreaker committed Aug 10, 2023
1 parent d6a0278 commit f4f978a
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -193,13 +193,21 @@ class ProtocolClient(
}
continuation.invokeOnCancellation {
httpStream.sendClose()
httpStream.receiveClose()
}
val stream = Stream(
onSend = { buffer ->
httpStream.send(streamFunc.requestBodyFunction(buffer))
},
onReceiveClose = {
httpStream.receiveClose()
},
onSendClose = {
httpStream.sendClose()
}
)
channel.invokeOnClose {
// Receive channel is closed so the stream's receive will be closed.
stream.receiveClose()
}
continuation.resume(
Expand Down

0 comments on commit f4f978a

Please sign in to comment.