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

Make connect() non-blocking #23

Merged
merged 2 commits into from
Nov 11, 2020
Merged

Conversation

oholsen
Copy link
Contributor

@oholsen oholsen commented Nov 10, 2020

Resolves #22.

@frederikaalund
Copy link
Collaborator

Hi Øystein, thanks for the pull request. Let me have a look. :)

I did not realize that paho.Client.connect is blocking. Good catch!

I had a brief look at paho.Client.connect_async that sounds promising but unfortunately doesn't work for our use case. At least not without reimplementing a significant portion of paho.mqtt ourselves.

In any case, seems to me like it's the right approach to simply execute paho.Client.connect_async in another thread (as done in your pull request).

Good to see a test as well. 👍 We need more pull requests in that area.

Thanks for you contribution. If you want, you can add your change to the changelog and attribute it to yourself.

@frederikaalund frederikaalund merged commit 0a7f2fc into empicano:master Nov 11, 2020
@oholsen
Copy link
Contributor Author

oholsen commented Feb 15, 2021

@frederikaalund Will there be a release soon that incorporates this and other fixes?

@frederikaalund
Copy link
Collaborator

I plan to close some of the issues this week. Afterwards, I'll make a release. :)

@oholsen
Copy link
Contributor Author

oholsen commented Feb 16, 2021 via email

@frederikaalund
Copy link
Collaborator

I just released v0.8.1 👍

Sorry about the delay.

@oholsen
Copy link
Contributor Author

oholsen commented Feb 23, 2021 via email

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.connect() blocks the event loop
2 participants