Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [paho-dev] Detecting disconnects

Hi Andrew,

I agree, not very useful. I can see where those return codes would
happen, but I've not been able to reproduce the behaviour myself. Can
you give me any more details on what you are doing? You should see a
printed error message as well when you get a 1 returned. Did you see
that and if so what was it?

I think this whole area might need a bit of a rethink for Paho 1.2.

Cheers,

Roger


On Sun, Jan 18, 2015 at 1:13 AM, Andrew McClure <andrew@xxxxxxxxxxxxxx> wrote:
> Am wondering the best way to manage error handling and reporting of > 0 return values from loop().
>
> e.g. the return value from loop() after the broker has gone away is initially the rc value - typically 1 (MQTT_ERR_NOMEM)
>
>         if self.socket() in socklist[0]:
>             rc = self.loop_read(max_packets)
>             if rc or (self._ssl is None and self._sock is None):
>                 return rc
>
> This is a little hard to report meaningfully. It is only on the subsequent reconnect attempt that we get the errno 61 - Connection Refused.
>
> Am thinking that ignoring or printing a debug statement with the returned rc value is the best we can hope for.  Thanks.
>
>
> _______________________________________________
> paho-dev mailing list
> paho-dev@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or unsubscribe from this list, visit
> https://dev.eclipse.org/mailman/listinfo/paho-dev


Back to the top