[Gluster-devel] client cannot reconnect
    Emmanuel Dreyfus 
    manu at netbsd.org
       
    Sun Sep 30 07:50:51 UTC 2012
    
    
  
Emmanuel Dreyfus <manu at netbsd.org> wrote:
> socket_event_handler() is called with a this = 0xbb70ec00 that already
> went through fini(). There is a wrong refcount somewhere.
With this fix, I can mount again. Please comment: is that correct?
--- rpc/rpc-transport/socket/src/socket.c.orig
+++ rpc/rpc-transport/socket/src/socket.c
@@ -278,8 +278,17 @@
                         gf_log (this->name, GF_LOG_DEBUG,
                                 "shutdown() returned %d. %s",
                                 ret, strerror (errno));
                 }
+
+                /*
+                 * Without this, reconnect (= disconnect + connect)
+                 * won't work except by accident. 
+                 */  
+                event_unregister (this->ctx->event_pool,
+                                  priv->sock, priv->idx);
+                close (priv->sock);
+                priv->sock = -1;
         }
 
 out:
         return ret;
-- 
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
manu at netbsd.org
    
    
More information about the Gluster-devel
mailing list