Skip to content

Commit

Permalink
lib: Increase net_connect*() EADDRNOTAVAIL retries to 20
Browse files Browse the repository at this point in the history
4 is too little, since on busy systems it's sometimes failing. These calls
should be pretty cheap, so lets try if 20 is enough.

It would be nice if this was configurable, but the only practical way right
now would be to use environment variable, which is a bit ugly. We could
try it next if 20 is still not enough.
  • Loading branch information
sirainen committed Apr 4, 2017
1 parent aa11368 commit 2ba6645
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/net.c
Expand Up @@ -52,7 +52,7 @@ union sockaddr_union_unix {
destination IP+port as well. In this case connect() will fail with
EADDRNOTAVAIL. We'll need to retry this and hope that the next attempt won't
conflict. */
#define MAX_CONNECT_RETRIES 4
#define MAX_CONNECT_RETRIES 20

bool net_ip_compare(const struct ip_addr *ip1, const struct ip_addr *ip2)
{
Expand Down

0 comments on commit 2ba6645

Please sign in to comment.