[EMAIL PROTECTED] 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to