Skip to content

WebSocket client does not attempt all IPs with short timeouts #1556

Description

@ungive

Hi, I migrated to libdatachannel and since then a few of my application's users experience consistent timeouts when their IPv6 connection has problems, e.g. when ping -6 always times out but ping -4 works. I used the QWebSocket implementation before and it never had that issue, so I think it's circumventable.

Some ideas:

  1. Prefer IPv4 (perhaps make this configurable)
  2. Fall back to IPv4 when IPv6 fails (probably difficult because timeouts will take forever)
  3. Connect to both at the same time (probably undesirable)

I don't really see a better option than 1. I think that's what Qt is doing too, but I am not sure. In my eyes that's the only way to explain why the WebSocket connection never times out with an older version that uses Qt WebSockets.

Would it be possible to add a switch to prefer IPv4 over IPv6?

Any other ideas are welcome too. Thank you!

Related: ungive/discord-music-presence#623

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions