diff --git a/src/main/kotlin/Main.kt b/src/main/kotlin/Main.kt index db5e4ce..d82904f 100644 --- a/src/main/kotlin/Main.kt +++ b/src/main/kotlin/Main.kt @@ -1,12 +1,14 @@ import kotlinx.coroutines.GlobalScope import kotlinx.coroutines.delay import kotlinx.coroutines.launch +import kotlinx.coroutines.runBlocking -fun main(){ +fun main() = runBlocking{ GlobalScope.launch { val mqtt = MqttSubscriber() mqtt.connect() delay(10000L) mqtt.disconnect() } + delay(20000L) } \ No newline at end of file