Skip to content

Commit

Permalink
fix(adam): prevent uncloseable readFully
Browse files Browse the repository at this point in the history
  • Loading branch information
Malinskiy committed May 5, 2024
1 parent d4ea7ee commit f69ce1e
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 @@ -130,6 +130,7 @@ class VertxSocket(private val socketAddress: SocketAddress, private val options:
val read = readAvailable(buffer.array(), offset + total, limit - total)
if (read == -1) {
assert(!buffer.hasRemaining()) { "Expected $limit bytes, received $total" }
break

Check warning on line 133 in adam/src/main/kotlin/com/malinskiy/adam/transport/vertx/VertxSocket.kt

View check run for this annotation

Codecov / codecov/patch

adam/src/main/kotlin/com/malinskiy/adam/transport/vertx/VertxSocket.kt#L133

Added line #L133 was not covered by tests
} else {
total += read
}
Expand Down
2 changes: 1 addition & 1 deletion buildSrc/src/main/kotlin/Versions.kt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
object Versions {
val adam = System.getenv("GIT_TAG_NAME") ?: "0.5.5"
val adam = System.getenv("GIT_TAG_NAME") ?: "0.5.7"
val kotlin = "1.9.10"
val coroutines = "1.7.3"
val coroutinesDebug = coroutines
Expand Down

0 comments on commit f69ce1e

Please sign in to comment.