From e911365abab2e8999fb41dc5b97531c0049b6392 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Mon, 2 Jun 2014 07:39:29 -0600 Subject: Notify upper layer when TIME_WAIT or FIN_WAIT2_2 timeout occurs --- nuttx/net/uip/uip_tcptimer.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'nuttx') diff --git a/nuttx/net/uip/uip_tcptimer.c b/nuttx/net/uip/uip_tcptimer.c index a2b3cdbe3..8a34660b3 100644 --- a/nuttx/net/uip/uip_tcptimer.c +++ b/nuttx/net/uip/uip_tcptimer.c @@ -125,6 +125,11 @@ void uip_tcptimer(FAR struct uip_driver_s *dev, FAR struct uip_conn *conn, if (conn->timer >= UIP_TIME_WAIT_TIMEOUT) { conn->tcpstateflags = UIP_CLOSED; + + /* Notify upper layers about the timeout */ + + result = uip_tcpcallback(dev, conn, UIP_TIMEDOUT); + nllvdbg("TCP state: UIP_CLOSED\n"); } } -- cgit v1.2.3