diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/netinet/tcp_usrreq.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c index b2fce82..6acf9da 100644 --- a/sys/netinet/tcp_usrreq.c +++ b/sys/netinet/tcp_usrreq.c @@ -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; |