Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mosquitto-dev] Mosquitto connection disconnection message time

Is it possible that the "delay" is due to your client
disconnecting uncleanly, so the broker doesn't mark the
disconnection until the keepalive has expired? Which is commonly
60seconds, => one minute delay.

Cheers,
Karl P


Roger Light <roger@xxxxxxxxxx> wrote:
> On Mon, May 23, 2016 at 12:02 PM, Rajeev Kumar
> <rajeev_ku@xxxxxxx> wrote:
> 
> > def on_connect(client, userdata, rc):
> >     client.will_set("Heart/Lwt", payload=str(datetime.datetime.now())+
> >         " Disconnected From Broker", qos=2, retain=False)
> 
> You can't set the will after you have connected. It must be set
> before you call client.connect*().
> 
> The code you posted is a start, but it's not a complete
> example. Please refer to these guides on asking questions and
> providing examples:
> 
> http://stackoverflow.com/help/how-to-ask
> http://stackoverflow.com/help/mcve
> 
> Cheers,
> 
> Roger
> _______________________________________________
> mosquitto-dev mailing list
> mosquitto-dev@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or
> unsubscribe from this list, visit
> https://dev.eclipse.org/mailman/listinfo/mosquitto-dev

Attachment: signature.asc
Description: OpenPGP Digital Signature


Back to the top