44aaf53839e1bbac42f6197df78bb71fe3b52ece galt Fri Oct 15 16:44:38 2010 -0700 protecting against infinite loop producing up tons of logging output diff --git src/gfServer/gfServer.c src/gfServer/gfServer.c index 921faa8..8d1390d 100644 --- src/gfServer/gfServer.c +++ src/gfServer/gfServer.c @@ -529,6 +529,7 @@ logInfo("Server ready for queries!"); printf("Server ready for queries!\n"); +int connectFailCount = 0; for (;;) { ZeroVar(&fromAddr); @@ -538,8 +539,15 @@ { warn("Error accepting the connection"); ++warnCount; + ++connectFailCount; + if (connectFailCount >= 100) + errAbort("100 continuous connection failures, no point in filling up the log in an infinite loop."); continue; } + else + { + connectFailCount = 0; + } if (ipLog) { if (fromAddr.sin_family == AF_INET)