[Libwebsockets] Multiple Client Connections

shyam goyal shyam_iisc at yahoo.com
Wed Dec 9 09:47:58 CET 2015

I am setting up multiple client connections to server at a time. Each connection is having a separate service loop running in a separate thread. Connection is closed when service loop returns -1. Sometime it takes a couple of minute after callback method returns -1 and socket_destroyed notification is received by the client. On receiving this notification I shut down the service loop.
I am seeing a strange behaviour when a connection is closed by my application and before receiving 'socket_destroyed' notification, application goes on creating an another connection. The new connection is set up properly most of the time but not always and I never get 'socket_destroyed' notification for first connection. I am doing some clean up on receiving this notification so things never cleaned up for first connection and service loop keep running for ever.
Please suggest me some idea to resolve this. Regards: Shyam Sunder Goyal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://libwebsockets.org/pipermail/libwebsockets/attachments/20151209/39e9009d/attachment.html>

More information about the Libwebsockets mailing list