This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: atHTTP hangs connections on select() errors
- From: Andrew Lunn <andrew at lunn dot ch>
- To: Tad Artis <tad_artis at alum dot mit dot edu>
- Cc: ecos-discuss at sources dot redhat dot com
- Date: Mon, 11 Jun 2007 23:56:09 +0200
- Subject: Re: [ECOS] atHTTP hangs connections on select() errors
- References: <466DD126.9020609@alum.mit.edu>
On Mon, Jun 11, 2007 at 02:48:06PM -0800, Tad Artis wrote:
> athttp often locks up resources and never frees them if select() returns
> an error.
>
> A robust implementation of athttp will want to change the main
> cyg_httpd_daemon listen() loop so that
> cyg_httpd_close_unused_sockets(listener); is called regardless of the
> return value from the listen() call. Otherwise, errors from listen()
> will prevent all connections (possibly causing the errors) from ever
> timing out and being shut down. The system will quickly run out of
> sockets, as all will be left in the ESTABLISHED state. Not theoretical,
> fairly easy to get listen() to return errors.
Could you provide a patch for this?
Thanks
Andrew
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss