diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2009-07-06 16:38:09 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2009-07-06 16:38:09 +0200 |
commit | e3040285dbf0854443bc2443e0de5ac59f6f839e (patch) | |
tree | 557eae59b899f2311a9a8ba80ea32e465fff3e9a /tests/nettester.c | |
parent | 7fdeac0bdcaad3525f203ae5dc1fa7636078e37f (diff) | |
download | rsyslog-e3040285dbf0854443bc2443e0de5ac59f6f839e.tar.gz rsyslog-e3040285dbf0854443bc2443e0de5ac59f6f839e.tar.xz rsyslog-e3040285dbf0854443bc2443e0de5ac59f6f839e.zip |
first shot at asynchronous stream writer with timeout capability
... seems to work on quick testing, but needs a far more testing
and improvement. Good milestone commit.
Diffstat (limited to 'tests/nettester.c')
-rw-r--r-- | tests/nettester.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/nettester.c b/tests/nettester.c index dbfb4db3..73abc46e 100644 --- a/tests/nettester.c +++ b/tests/nettester.c @@ -128,12 +128,13 @@ tcpSend(char *buf, int lenBuf) if(connect(sock, (struct sockaddr*)&addr, sizeof(addr)) == 0) { break; } else { - if(retries++ == 30) { + if(retries++ == 50) { ++iFailed; fprintf(stderr, "connect() failed\n"); return(1); } else { - usleep(100); + fprintf(stderr, "connect() failed, retry %d\n", retries); + usleep(100000); /* ms = 1000 us! */ } } } |