This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: Re: __tcp_close() can't close connection in Redboot
On Wed, 2005-10-12 at 08:34 -0500, Grant Edwards wrote:
> In gmane.os.ecos.general, you wrote:
>
> > RedBoot hangs once it sees the CLOSE_WAIT condition.
>
> I've never seen that happen.
You won't - it just won't look for another 'telnet' session
when the current one closes until it's completely closed.
>
> > You need to continually call __tcp_poll() which will
> > eventually flush the connection which then goes to CLOSED.
>
> You have to continually call __tcp_poll() no matter what state
> the socket is, since RedBoot is single-threaded.
>
> > At that time, you can create a new connection.
> >
> > Note: this code is untested for more than one active TCP connection,
> > so beware.
>
> It worked OK for me. :)
Nice to know.
--
------------------------------------------------------------
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