client: don't timeout connection attempts until some connection succeeds
So when trying to connect, instead of dropping a connection, then starting a new one we could just start a new one in parallel, hoping that the old one will succeed. Then, when one (or however many we need) succeeds, drop the other ones.
We probably still need keep the timeout, but make it longer.
I am not sure if there is already code that does this. If there is, then I think DataChannelTimeout
simply needs to be made greater than ReconnectTimeout
.
- https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/-/blob/c983c13a84554d0ba1ffcdd054491090c0eafc54/client/lib/snowflake.go#L47-57
- https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/-/blob/c983c13a84554d0ba1ffcdd054491090c0eafc54/client/lib/webrtc.go#L174-182
Related:
Edited by WofWca