Description
I've encountered a crash when running in a scenario where network connectivity is interrupted and restored. The crash occurs towards the end of lws_client_connect_via_info()
, but appears to happen because earlier on in the function the wsi was destroyed.
I managed to trace the problem to lws_async_dns_query()
, which is being called with lws_client_connect_3_connect()
as a callback. This callback has some error paths which can result in the wsi being destroyed, however in my case this seems to be happening when the callback is called in lws_async_dns_complete()
, which does not report an error in this case.
I put together a patch which fixes the issue for me, but I'd appreciate some feedback on whether this is the correct fix. Please see PR #3388