mqtt_lua
mqtt_lua copied to clipboard
fix arithmetic on a nil value error when subscribing to topic $SYS/broker/clients/connected
An error occurs in the context of clients subscribing to topic "$SYS/broker/clients/connected" in mosquitto server.
Verifying if the byte value (string.byte(message, index + 1)) is not nil is enough to avoid the error and subsequent program termination.