emqx / MQTTX

A Powerful and All-in-One MQTT 5.0 client toolbox for Desktop, CLI and WebSocket.
https://mqttx.app
Apache License 2.0
3.84k stars 444 forks source link

fix(cli): fix bench sub duplicate logs #1669

Closed ysfscream closed 4 months ago

ysfscream commented 4 months ago

What is the current behavior?

The error was caused by connection delays, which caused multiple subscription callbacks to trigger log messages simultaneously. Adding the subscribedCount variable and the isLogged flag ensures that the log message is only executed once.

image

What is the new behavior?

image