This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: Re: RedBoot TCP socket stays in TIME_WAIT state forever.
- From: Gary Thomas <gary at mlbassoc dot com>
- To: Grant Edwards <grante at visi dot com>
- Cc: eCos Discussion <ecos-discuss at ecos dot sourceware dot org>
- Date: Mon, 10 Apr 2006 06:26:55 -0600
- Subject: Re: [ECOS] Re: RedBoot TCP socket stays in TIME_WAIT state forever.
- References: <e0vcll$rst$1@sea.gmane.org> <e0ve4n$5j0$1@sea.gmane.org>
On Wed, 2006-04-05 at 03:39 +0000, Grant Edwards wrote:
> On 2006-04-05, Grant Edwards <grante@visi.com> wrote:
>
> > AFAICT, the only way to get out of _TIME_WAIT state is if
> > somebody called tcp_send() while in that state so that a timer
> > gets set with the do_close() callback.
> >
> > How would tcp_send() ever get called once we've hit step 4)
> > above? Everything's been ACKed so there is no reason for the
> > stack itself to ever try to send anything, and calling
> > __tcp_write() in the application code is just going to return
> > immediately becuase the socket isn't in a valid state for
> > calling write().
> >
> > Shouldn't the 1s/2m timer be set when the socket transitions to
> > the _TIME_WAIT state?
>
> Moving __timer_set(&s->timer, s->reuse ? 1000 : 120000, do_close, s)
> to the places where the state transitions to _TIME_WAIT seems to
> have fixed the problem.
Would you like to propose an actual patch for this, please?
Also, do you have a test case (or way to show the problem)?
--
------------------------------------------------------------
Gary Thomas | Consulting for the
MLB Associates | Embedded world
------------------------------------------------------------
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss