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: __tcp_close() can't close connection in Redboot


In gmane.os.ecos.general, you wrote:

> RedBoot hangs once it sees the CLOSE_WAIT condition.

I've never seen that happen.

> 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. :)

-- 
Grant Edwards                   grante             Yow!  My forehead feels
                                  at               like a PACKAGE of moist
                               visi.com            CRANBERRIES in a remote
                                                   FRENCH OUTPOST!!

-- 
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]