diff options
Diffstat (limited to 'xlators/protocol/client/src/client.c')
| -rw-r--r-- | xlators/protocol/client/src/client.c | 18 | 
1 files changed, 16 insertions, 2 deletions
diff --git a/xlators/protocol/client/src/client.c b/xlators/protocol/client/src/client.c index 8955e237dee..acbc4829bb4 100644 --- a/xlators/protocol/client/src/client.c +++ b/xlators/protocol/client/src/client.c @@ -2062,7 +2062,7 @@ out:  int  notify (xlator_t *this, int32_t event, void *data, ...)  { -        clnt_conf_t *conf  = NULL; +        clnt_conf_t     *conf  = NULL;          conf = this->private;          if (!conf) @@ -2076,8 +2076,22 @@ notify (xlator_t *this, int32_t event, void *data, ...)                          "on transport");                  rpc_clnt_start (conf->rpc); +                break;          } -        break; + +        case GF_EVENT_PARENT_DOWN: +                gf_log (this->name, GF_LOG_INFO, +                        "current graph is no longer active, destroying " +                        "rpc_client "); + +                pthread_mutex_lock (&conf->lock); +                { +                        conf->parent_down = 1; +                } +                pthread_mutex_unlock (&conf->lock); + +                rpc_clnt_disable (conf->rpc); +                break;          default:                  gf_log (this->name, GF_LOG_DEBUG,  | 
