mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-23 16:01:42 +00:00
When turning off TCP_NOPUSH, only call tcp_output() to immediately flush
any pending data if the connection is established. Submitted by: csjp Reviewed by: lstewart MFC after: 1 week
This commit is contained in:
parent
5e86ca0084
commit
d28b9e89a9
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=218271
@ -1328,9 +1328,10 @@ tcp_ctloutput(struct socket *so, struct sockopt *sopt)
|
||||
INP_WLOCK_RECHECK(inp);
|
||||
if (optval)
|
||||
tp->t_flags |= TF_NOPUSH;
|
||||
else {
|
||||
else if (tp->t_flags & TF_NOPUSH) {
|
||||
tp->t_flags &= ~TF_NOPUSH;
|
||||
error = tcp_output(tp);
|
||||
if (TCPS_HAVEESTABLISHED(tp->t_state))
|
||||
error = tcp_output(tp);
|
||||
}
|
||||
INP_WUNLOCK(inp);
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user