8000 Edge case in async DNS causes crash · Issue #3389 · warmcat/libwebsockets · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Edge case in async DNS causes crash #3389
Closed
@mattfischer

Description

@mattfischer

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0