Repositories
/
olsrd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
edff05f
)
info: allow a small delay between connection accept and request arrival
author
Ferry Huberts
<ferry.huberts@pelagic.nl>
Tue, 3 Jan 2017 10:31:39 +0000
(11:31 +0100)
committer
Ferry Huberts
<ferry.huberts@pelagic.nl>
Wed, 4 Jan 2017 08:47:11 +0000
(09:47 +0100)
To compensate for slow networks and far-away nodes
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
lib/info/olsrd_info.c
patch
|
blob
|
history
diff --git
a/lib/info/olsrd_info.c
b/lib/info/olsrd_info.c
index
9ba73ba
..
0334333
100644
(file)
--- a/
lib/info/olsrd_info.c
+++ b/
lib/info/olsrd_info.c
@@
-757,7
+757,9
@@
static void ipc_action(int fd, void *data __attribute__ ((unused)), unsigned int
return;
}
return;
}
- timeout.tv_sec = timeout.tv_usec = 0;
+ /* Wait at most this much time for the request to arrive on the connection */
+ timeout.tv_sec = 0;
+ timeout.tv_usec = (outbuffer.count >= MAX_CLIENTS) ? 0 : (20 * 1000); /* 20 msec */
FD_ZERO(&read_fds);
#ifndef _WIN32
FD_ZERO(&read_fds);
#ifndef _WIN32