File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -138,6 +138,7 @@ class MQTT:
138
138
:param int socket_timeout: How often to check socket state for read/write/connect operations,
139
139
in seconds.
140
140
:param int connect_retries: How many times to try to connect to broker before giving up.
141
+ :param class user_data: arbitrary data to pass as a second argument to the callbacks.
141
142
142
143
"""
143
144
@@ -158,6 +159,7 @@ def __init__(
158
159
use_binary_mode = False ,
159
160
socket_timeout = 1 ,
160
161
connect_retries = 5 ,
162
+ user_data = None ,
161
163
):
162
164
163
165
self ._socket_pool = socket_pool
@@ -175,7 +177,7 @@ def __init__(
175
177
self ._connect_retries = connect_retries
176
178
177
179
self .keep_alive = keep_alive
178
- self ._user_data = None
180
+ self ._user_data = user_data
179
181
self ._is_connected = False
180
182
self ._msg_size_lim = MQTT_MSG_SZ_LIM
181
183
self ._pid = 0
You can’t perform that action at this time.
0 commit comments