diff options
Diffstat (limited to 'nuttx/net/net_sendfile.c')
-rw-r--r-- | nuttx/net/net_sendfile.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/nuttx/net/net_sendfile.c b/nuttx/net/net_sendfile.c index 266bb5e08..7ec214b74 100644 --- a/nuttx/net/net_sendfile.c +++ b/nuttx/net/net_sendfile.c @@ -152,6 +152,12 @@ static uint16_t ack_interrupt(FAR struct uip_driver_s *dev, FAR void *pvconn, if ((flags & UIP_ACKDATA) != 0) { + /* Update the timeout */ + +#if defined(CONFIG_NET_SOCKOPTS) && !defined(CONFIG_DISABLE_CLOCK) + pstate->snd_time = clock_systimer(); +#endif + /* The current acknowledgement number number is the (relative) offset * of the of the next byte needed by the receiver. The snd_isn is the * offset of the first byte to send to the receiver. The difference @@ -326,12 +332,6 @@ static uint16_t sendfile_interrupt(FAR struct uip_driver_s *dev, FAR void *pvcon pstate->snd_sent += sndlen; nllvdbg("pid: %d SEND: acked=%d sent=%d flen=%d\n", getpid(), pstate->snd_acked, pstate->snd_sent, pstate->snd_flen); - - /* Update the send time */ - -#if defined(CONFIG_NET_SOCKOPTS) && !defined(CONFIG_DISABLE_CLOCK) - pstate->snd_time = clock_systimer(); -#endif } } else @@ -346,7 +346,7 @@ static uint16_t sendfile_interrupt(FAR struct uip_driver_s *dev, FAR void *pvcon */ #if defined(CONFIG_NET_SOCKOPTS) && !defined(CONFIG_DISABLE_CLOCK) - else if (sendfile_timeout(pstate)) + if (sendfile_timeout(pstate)) { /* Yes.. report the timeout */ |