[Libwebsockets] LWS_CALLBACK_SERVER_NEW_CLIENT_INSTANTIATED

Andy Green andy at warmcat.com
Sat Mar 20 06:27:56 CET 2021



On 3/19/21 9:55 PM, Gregory Kip wrote:
> Andy,
> 
> Thanks for all you do.
> 
> I’m transitioning my LWS client from v2.4.0 to v4.1.7, which builds 
> cleanly on Mac OS 11.2.3 using:


LLL_DEBUG: lws_client_connect_via_info: wsi 0x7fe80d6fe650: adoption cb 
19 to h1 myProtocol

LWS_CALLBACK_SERVER_NEW_CLIENT_INSTANTIATED (19)

LLL_INFO: lws_context_destroy: ctx 0x7fe80f808200


So you are exiting the event loop and destroying the context at that 
point... that's something your code is deciding to do, since the 
conditions to do that are in your code, it's a separate decision to 
whatever the fate of the connection attempt was going to be.

Does a minimal example like lws-minimal-ws-client or -http-client work 
on your platform?  Then just align your code to do what that does.

-Andy


More information about the Libwebsockets mailing list