From: Timo Sirainen Date: Tue, 4 Apr 2017 10:28:44 +0000 (+0300) Subject: lib: Increase net_connect*() EADDRNOTAVAIL retries to 20 X-Git-Tag: 2.2.29.rc1~16 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2ba664518940f4cef7f7339719944f80d0a238ca;p=thirdparty%2Fdovecot%2Fcore.git lib: Increase net_connect*() EADDRNOTAVAIL retries to 20 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. --- diff --git a/src/lib/net.c b/src/lib/net.c index e6df547146..cd414113df 100644 --- a/src/lib/net.c +++ b/src/lib/net.c @@ -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) {