Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [paho-dev] python: implicit loop_stop on disconnect, multiple clients, watchdogs

That makes sense as a work-around, and I'll try that for sure.

I guess the question that arises is whether that is how it "should" be...
Do other language bindings do the same thing?


On Mon, Feb 17, 2025 at 10:46 AM Greg Troxel <gdt@xxxxxxxxxx> wrote:
Peter Silva via paho-dev <paho-dev@xxxxxxxxxxx> writes:

> It would make more sense (principle of least surprise) to me that the loop_
> controls would be independent of connection state. I don´t think
> connect/disconnect should mess with the loop at all.  And one of the
> features in my having active subscriptions to more than one broker at a
> time... So this is doubly relevant.  If one broker is broken, I don´t want
> the disconnect to break the other.  I will get this working with AMQP
> first, but then immediately turn to do the same with MQTT.

As I read the code, the loop is per client object.  Each object can
connect to one broker.

I think you just need to call loop_start every time you call connect
(assuming you call connect only once after start or disconnect).

Back to the top