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