Skip to content

Commit

Permalink
add flushIfNeeded
Browse files Browse the repository at this point in the history
  • Loading branch information
whyoleg committed Dec 10, 2024
1 parent f9a1cf1 commit c42960b
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,10 @@ private class KtorTcpConnection(
}

@OptIn(InternalAPI::class)
private fun ByteWriteChannel.writeFrame(frame: Buffer) {
private suspend fun ByteWriteChannel.writeFrame(frame: Buffer) {
writeBuffer.writeInt24(frame.size.toInt())
writeBuffer.transferFrom(frame)
flushIfNeeded()
}

@OptIn(InternalAPI::class)
Expand Down

0 comments on commit c42960b

Please sign in to comment.