summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-store.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-store.c b/xlators/mgmt/glusterd/src/glusterd-store.c
index 7b085e2..a5938bc 100644
--- a/xlators/mgmt/glusterd/src/glusterd-store.c
+++ b/xlators/mgmt/glusterd/src/glusterd-store.c
@@ -1780,7 +1780,10 @@ glusterd_store_retrieve_peers (xlator_t *this)
(void) glusterd_store_iter_destroy (iter);
- args.mode = GD_MODE_SWITCH_ON;
+ if (state == GD_FRIEND_STATE_REJECTED)
+ args.mode = GD_MODE_ON;
+ else
+ args.mode = GD_MODE_SWITCH_ON;
ret = glusterd_friend_add (hostname, 0, state, &uuid,
NULL, &peerinfo, 1, &args);