This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Re: RedBoot TCP socket stays in TIME_WAIT state forever.


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]