Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

paho Client.ClientConfig is now private #221

Merged
merged 1 commit into from
Jan 10, 2024
Merged

paho Client.ClientConfig is now private #221

merged 1 commit into from
Jan 10, 2024

Conversation

MattBrittan
Copy link
Contributor

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

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)

(cherry picked from commit 1b2c146)
@MattBrittan MattBrittan merged commit 839e884 into eclipse:master Jan 10, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Client.ClientConfig public - invites race conditions
1 participant