This is the mail archive of the ecos-patches@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: Network TCP Handler: stale socket disposal


>  		} else if (so->so_state & SS_COMP) {
> +			 if((so->so_error == ECONNRESET) ||
> +				 (so->so_error == ECONNREFUSED)){ // forced drop if flagged
> +				  TAILQ_REMOVE(&head->so_comp, so, so_list);
> +				  head->so_qlen--;
> +			 } else {
>  			/*
>  			 * We must not decommission a socket that's
>  			 * on the accept(2) queue.  If we do, then
> @@ -249,11 +258,13 @@
>  			 * that the listening socket was ready.
>  			 */

The full comment is:

                        /*
                         * We must not decommission a socket that's
                         * on the accept(2) queue.  If we do, then
                         * accept(2) may hang after select(2) indicated
                         * that the listening socket was ready.
                         */

Are you sure the socket is not on the accept queue? I wounder if the
accept code should free the socket?

       Andrew


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