Fixup fromcvs/togit conversion
[minix-pkgsrc.git] / filesystems / glusterfs / patches / patch-da
blobb8261c68336f2c3a10e187ca43020d288e6d726c
1 $NetBSD$
3 Avoid corner case where the client is unsable to reconnect to servers
5 Backport of a bit from http://review.gluster.org/362
7 --- rpc/rpc-transport/socket/src/socket.c.orig  2012-09-30 06:42:07.000000000 +0200
8 +++ rpc/rpc-transport/socket/src/socket.c       2012-09-30 09:41:50.000000000 +0200
9 @@ -278,8 +278,17 @@
10                          gf_log (this->name, GF_LOG_DEBUG,
11                                  "shutdown() returned %d. %s",
12                                  ret, strerror (errno));
13                  }
15 +                /*
16 +                 * Without this, reconnect (= disconnect + connect)
17 +                 * won't work except by accident. 
18 +                 */  
19 +                event_unregister (this->ctx->event_pool,
20 +                                  priv->sock, priv->idx);
21 +                close (priv->sock);
22 +                priv->sock = -1;
23          }
25  out:
26          return ret;