diff --git a/locust_plugins/users/mqtt.py b/locust_plugins/users/mqtt.py index 1983340..6dc453f 100644 --- a/locust_plugins/users/mqtt.py +++ b/locust_plugins/users/mqtt.py @@ -118,7 +118,7 @@ def __init__( self.on_publish = self._on_publish_cb self.on_subscribe = self._on_subscribe_cb - if self.protocol == mqtt.MQTTv5: + if protocol == mqtt.MQTTv5: self.on_disconnect = self._on_disconnect_cb_v5 self.on_connect = self._on_connect_cb_v5 else: