repositories
/
deb_libnfs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a669857
)
for UDP sockets, we ONLY wait for pollin events
author
Ronnie Sahlberg
<ronniesahlberg@gmail.com>
Sun, 26 Jun 2011 08:26:34 +0000
(18:26 +1000)
committer
Ronnie Sahlberg
<ronniesahlberg@gmail.com>
Sun, 26 Jun 2011 08:26:34 +0000
(18:26 +1000)
since upd sockets are always writeable.
they just silently drop packets when congested
lib/socket.c
patch
|
blob
|
blame
|
history
diff --git
a/lib/socket.c
b/lib/socket.c
index 7a291346b7bb4d4f0f39f8cc728899441407c488..2c77ef64c549d3de2f1731a7a691d2a07d74e613 100644
(file)
--- a/
lib/socket.c
+++ b/
lib/socket.c
@@
-47,6
+47,11
@@
int rpc_which_events(struct rpc_context *rpc)
{
int events = rpc->is_connected ? POLLIN : POLLOUT;
+ if (rpc->is_udp != 0) {
+ /* for udp sockets we only wait for pollin */
+ return POLLIN;
+ }
+
if (rpc->outqueue) {
events |= POLLOUT;
}