discovery: Don't start STUN/TURN disco on errorneous socket
authorJakub Adam <jakub.adam@collabora.com>
Tue, 16 Jul 2019 09:55:32 +0000 (11:55 +0200)
committerOlivier CrĂȘte <olivier.crete@ocrete.ca>
Mon, 22 Jul 2019 17:22:46 +0000 (17:22 +0000)
commit702fcba914a46fe305bf080409e73fb1daaa9434
tree85fd25375d2213c4c2e4e38b2b4dfa475b73b5f9
parent318ba4dea6596b7825a71fdb34473549e231f757
discovery: Don't start STUN/TURN disco on errorneous socket

If the initial attempt at sending discovery message returns a socket
error, don't start the retransmit timer and immediately mark such
discovery item as done. This is to quickly eliminate clearly
non-functioning items from the discovery process.

Particularly improves times to finish discovery on Windows, where
sending data from a link-local (169.254.0.0/16) IP to a destination not
on the same subnet leads to "A socket operation was attempted to an
unreachable network" error. Pointless retransmissions on those sockets
prolonged discovery in the order of seconds.
agent/discovery.c