Mercurial > dovecot > core-2.2
changeset 21892:22c5f005625a
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.
author | Timo Sirainen <timo.sirainen@dovecot.fi> |
---|---|
date | Tue, 04 Apr 2017 13:28:44 +0300 |
parents | 61428c866387 |
children | 5511ffac2ca4 |
files | src/lib/net.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib/net.c Mon Apr 03 18:44:52 2017 +0300 +++ b/src/lib/net.c Tue Apr 04 13:28:44 2017 +0300 @@ -52,7 +52,7 @@ 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) {