← Back to team overview

mosquitto-users team mailing list archive

Re: Connection lost question

 

Hi Francois,

I'm afraid that after sending you here from twitter, this is actually
related to the paho client libraries. When a client connects to
mosquitto (or other mqtt broker) with a duplicate client id, the
oldest client of the two is disconnected. There is no communication
with the old client about that, it is just the socket being closed.
This means that it is up to the client how to inform you, although it
is essentially impossible for the client to know that it has been
disconnected for this reason.

Cheers,

Roger


On Thu, Dec 12, 2013 at 9:50 AM, Francois van der Merwe
<francoisvdm@xxxxxxxxxxxxxxxxx> wrote:
> Hi All
>
>
>
> Windows c client, paho libs.  Mosquitto server on raspberry Pi or on Windows
> 7.
>
>
>
> When another MQTT client connects to the broker with the same client ID it
> logs off the first client and it calls back to “connlost” with 2 parameters,
> “context” and “cause”.
>
>
>
> I would expect to find some values in those two fields, but I only see 0x0
> in both fields.
>
>
>
> Any comments?
>
>
>
> Thank you
>
>
>
>
>
> Francois van der Merwe
>
> Integration Specialist
>
> 082 556 9467
>
>
>
> Follow me on twitter: francoisvdmerwe
>
>
>
>
> --
> Mailing list: https://launchpad.net/~mosquitto-users
> Post to     : mosquitto-users@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~mosquitto-users
> More help   : https://help.launchpad.net/ListHelp
>


Follow ups

References