Skip to content

Commit

Permalink
Fix payload content in ZPub example
Browse files Browse the repository at this point in the history
  • Loading branch information
oteffahi committed Feb 27, 2024
1 parent c887aa9 commit 8131dde
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions examples/src/main/kotlin/io.zenoh/ZPub.kt
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ fun main() {
session.declarePublisher(keyExpr).res().onSuccess { pub ->
pub.use {
println("Press CTRL-C to quit...")
var idx = 1
var idx = 0
while (true) {
Thread.sleep(1000)
val payload = "Pub from Kotlin!"
println(
"Putting Data ('$keyExpr': '[${
val payload = "[${
idx.toString().padStart(4, ' ')
}] $payload')..."
}] Pub from Kotlin!"
println(
"Putting Data ('$keyExpr': '$payload')..."
)
pub.put(payload).res()
idx++
Expand Down

0 comments on commit 8131dde

Please sign in to comment.