From 35dd4e1377da019f53031b78f6d2a155c2870315 Mon Sep 17 00:00:00 2001 From: kris Date: Mon, 2 Aug 2010 07:41:53 +0000 Subject: [PATCH] Don't retry in Sendto() if errno is EMSGSIZE: sleeping for a few seconds won't shorten the packet. --- libnetutil/netutil.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libnetutil/netutil.cc b/libnetutil/netutil.cc index 920fb2678..08989abde 100644 --- a/libnetutil/netutil.cc +++ b/libnetutil/netutil.cc @@ -3095,7 +3095,7 @@ int Sendto(const char *functionname, int sd, #if WIN32 return -1; #else - if (retries > 2 || err == EPERM || err == EACCES + if (retries > 2 || err == EPERM || err == EACCES || err == EMSGSIZE || err == EADDRNOTAVAIL || err == EINVAL) return -1; sleeptime = 15 * (1 << (2 * retries));