Author: jhb Date: Fri Feb 4 14:13:15 2011 New Revision: 218271 URL: http://svn.freebsd.org/changeset/base/218271
Log: 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 Modified: head/sys/netinet/tcp_usrreq.c Modified: head/sys/netinet/tcp_usrreq.c ============================================================================== --- head/sys/netinet/tcp_usrreq.c Fri Feb 4 14:06:57 2011 (r218270) +++ head/sys/netinet/tcp_usrreq.c Fri Feb 4 14:13:15 2011 (r218271) @@ -1328,9 +1328,10 @@ tcp_ctloutput(struct socket *so, struct 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; _______________________________________________ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"