diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2011-02-28 16:29:43 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2011-02-28 16:29:43 +0000 |
commit | 8dbb068ca743a811b82574c1c80e96247114ba72 (patch) | |
tree | 6826105894d998b8d14288e9b50f7539a69ca16a /sys/kern | |
parent | 989c4668410e5f06975ac9cf8b7e3b290eeed732 (diff) |
When the maximum splice length has been reached, send out the data
immediately by unsetting the SS_ISSENDING flag. This prevents a
possible 5 seconds delay in socket splicing.
ok markus@; commit it deraadt@
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/uipc_socket.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index 115bb69a8d1..36d12b890f0 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uipc_socket.c,v 1.85 2011/01/07 17:50:42 bluhm Exp $ */ +/* $OpenBSD: uipc_socket.c,v 1.86 2011/02/28 16:29:42 bluhm Exp $ */ /* $NetBSD: uipc_socket.c,v 1.21 1996/02/04 02:17:52 christos Exp $ */ /* @@ -1245,7 +1245,7 @@ somove(struct socket *so, int wait) /* Append all remaining data to drain socket. */ if (m) { - if (so->so_rcv.sb_cc == 0) + if (so->so_rcv.sb_cc == 0 || maxreached) sosp->so_state &= ~SS_ISSENDING; error = (*sosp->so_proto->pr_usrreq)(sosp, PRU_SEND, m, NULL, NULL, NULL); |