eclipse / paho.golang

Go libraries
Other
327 stars 92 forks source link

paho `Client.ClientConfig` is now private #221

Closed MattBrittan closed 7 months ago

MattBrittan commented 7 months ago

Users could previously access/change the ClientConfig held by paho.Client; this invited race conditions (paho.Client could use values from the config at any time and no locking mechanism was provided).

To avoid this, the config is now private and examples etc have been updated. A getter for ClientID has been added (as this was needed in examples); I suspect additional getters may be of benefit (but will await feedback for that).

This may break some users code (but that is probably a good thing)

closes #210