From 626131fb28feecfe14ee9f3ab77f7c0b160d1442 Mon Sep 17 00:00:00 2001 From: Simon Goldschmidt Date: Mon, 22 Aug 2011 18:52:27 +0200 Subject: [PATCH] fixed bug #33962 TF_FIN not always set after FIN is sent. (This merely prevents nagle from not transmitting fast after closing.) --- CHANGELOG | 4 ++++ src/core/tcp_out.c | 1 + 2 files changed, 5 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index cd4fbbe0..2af850c6 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -21,6 +21,10 @@ HISTORY ++ Bugfixes: + 2011-08-22: Simon Goldschmidt + * tcp_out.c: fixed bug #33962 TF_FIN not always set after FIN is sent. (This + merely prevents nagle from not transmitting fast after closing.) + 2011-07-22: Simon Goldschmidt * api_lib.c, api_msg.c, sockets.c, api.h: fixed bug #31084 (socket API returns always EMSGSIZE on non-blocking sockets if data size > send buffers) -> now diff --git a/src/core/tcp_out.c b/src/core/tcp_out.c index a32d0258..e9ef14d8 100644 --- a/src/core/tcp_out.c +++ b/src/core/tcp_out.c @@ -133,6 +133,7 @@ tcp_send_fin(struct tcp_pcb *pcb) if ((TCPH_FLAGS(last_unsent->tcphdr) & (TCP_SYN | TCP_FIN | TCP_RST)) == 0) { /* no SYN/FIN/RST flag in the header, we can add the FIN flag */ TCPH_SET_FLAG(last_unsent->tcphdr, TCP_FIN); + pcb->flags |= TF_FIN; return ERR_OK; } }