Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[paho-dev] python paho-mqtt 1.1 connect() not blocking?

python: 3.4.2
paho-mqtt: 1.1
os: raspian-jessie

According to the following documentation: https://pypi.python.org/pypi/paho-mqtt/1.1 the connect() call is supposed to be a blocking function.

**********
The connect() function connects the client to a broker. This is a blocking function.

**********

In my usage of the library, this appears to not be the case. I attempted to execute a subscribe() immediately after a connect but was not successful in getting subscribed. Moving the subscribe into onconnect() did work but indicated that the documentation may be incorrect.

In viewing the source, it appears that connect() calls into connect_async() which would make it a non-blocking call.

Am I correct in my observations?

Kind Regards.

Randy Forbes

Back to the top