tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mladen Turk <mt...@apache.org>
Subject Re: svn commit: r603637 - /tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c
Date Wed, 12 Dec 2007 15:47:55 GMT
rjung@apache.org wrote:
> Author: rjung
> Date: Wed Dec 12 07:10:32 2007
> New Revision: 603637
> 
> URL: http://svn.apache.org/viewvc?rev=603637&view=rev
> Log:
> Slightly rearange ajp_next_connection().
>

>      int rc;
>      ajp_worker_t *aw = ae->worker;
> -    jk_sock_t sock;
>  
> +    /* Close previous socket */
> +    if (IS_VALID_SOCKET(ae->sd))
> +        jk_shutdown_socket(ae->sd, l);
> +    /* Mark existing endpoint socket as closed */
> +    ae->sd = JK_INVALID_SOCKET;
>      JK_ENTER_CS(&aw->cs, rc);
>      if (rc) {
>          unsigned int i;
> -        sock = ae->sd;
> -        /* Mark existing endpoint socket as closed */
> -        ae->sd = JK_INVALID_SOCKET;

Hmm, I'm almost sure this is wrong.
It makes race condition in threaded servers.
shutdown is blocking call.
Any particular reason why you changed that?

Regards,
Mladen


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message