From a84a55c7e914ab3eab75c4891485490a55a54f76 Mon Sep 17 00:00:00 2001 From: MrCroxx Date: Fri, 28 Jun 2024 17:35:02 +0800 Subject: [PATCH] fix(connector): replace blocking sleep with async sleep in MQTT sink Signed-off-by: MrCroxx --- src/connector/src/sink/mqtt.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/connector/src/sink/mqtt.rs b/src/connector/src/sink/mqtt.rs index d9dfdbe03b21b..9e86b5ec97e2a 100644 --- a/src/connector/src/sink/mqtt.rs +++ b/src/connector/src/sink/mqtt.rs @@ -288,7 +288,7 @@ impl MqttSinkWriter { } err => { tracing::error!("Failed to poll mqtt eventloop: {}", err.as_report()); - std::thread::sleep(std::time::Duration::from_secs(1)); + tokio::time::sleep(std::time::Duration::from_secs(1)).await; } }, }