From 8131dde5dab9043ea4807e8a5e18d7a4ae8c0a77 Mon Sep 17 00:00:00 2001 From: Oussama Teffahi Date: Fri, 23 Feb 2024 17:57:06 +0100 Subject: [PATCH] Fix payload content in ZPub example --- examples/src/main/kotlin/io.zenoh/ZPub.kt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/src/main/kotlin/io.zenoh/ZPub.kt b/examples/src/main/kotlin/io.zenoh/ZPub.kt index 814c6738..00d4e525 100644 --- a/examples/src/main/kotlin/io.zenoh/ZPub.kt +++ b/examples/src/main/kotlin/io.zenoh/ZPub.kt @@ -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++