[Libwebsockets] Question about timer

Stefano Mora stefano.mora at newdep.com
Wed Jul 24 16:57:29 CEST 2019

Hi all,
in my application I start the timer with:
   lws_set_timer_usecs( wsi, TIMER_USECS);

and this is ok.
A second client connects the server and, since it is running, it do not start another timer.
This is ok and the timer continues to flow thanks to:

 lwsl_user("LWS_CB_TIMER t:%d\n", engineData.timer);
 lws_set_timer_usecs( wsi, engineData.timer ? TIMER_USECS : -1);

But, when a client disconnects the TIMER 'reason' stops to coming (the last engineData.timer I see is 1) and the other client is running without the timer.
I'm pretty sure I do not disable the timer.

I my understanding the timer is a server-wide object, I mean it not referred to a particular client, is it?

Any idea why the timer stops?
Thanks, regards

Stefano Mora / SW Engineer
stefano.mora at newdep.com<mailto:stefano.mora at newdep.com>
Office: +39 0521  1756855/ Fax: +39 0521 631414
Sede legale ed operativa: Via Monte Aquila, 2/B - 43124 Parma - ITALY
Website: http://www.newdep.com<http://www.newdep.com/>
Il presente messaggio, corredato dei relativi allegati, contiene informazioni strettamente riservate ai sensi del D.L.gs. 196/2003 ed è destinato esclusivamente ai destinatari. Chiunque ricevesse questo messaggio per errore è pregato di darne gentilmente comunicazione al mittente, di non copiarlo, divulgarlo o distribuirlo, nonchè di distruggerlo.
This communication may contain confidential and/or otherwise proprietary material and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://libwebsockets.org/pipermail/libwebsockets/attachments/20190724/b055a351/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Outlook-1456477059.png
Type: image/png
Size: 3330 bytes
Desc: Outlook-1456477059.png
URL: <https://libwebsockets.org/pipermail/libwebsockets/attachments/20190724/b055a351/attachment.png>

More information about the Libwebsockets mailing list