Re: client cannot reconnect

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Emmanuel Dreyfus <manu@xxxxxxxxxx> 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@xxxxxxxxxx



[Index of Archives]     [Gluster Users]     [Ceph Users]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux