diff options
author | Anush Shetty <anush@gluster.com> | 2010-05-12 03:59:47 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2010-05-13 12:12:42 -0700 |
commit | 857c458fe1903ded0b6b7b444942f4f996223460 (patch) | |
tree | 4996fb46541dd4805194b5ea33c2d67d6a1a4701 /transport | |
parent | 675d330897aa6923d667cc318ee466cb0cb84f9b (diff) |
Adding GF_LOG_OCCASIONALLY to prevent repeated log messages when server goes down
Signed-off-by: Anush Shetty <anush@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
BUG: 906 (when server is down, client log gets filled up with error msgs)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=906
Diffstat (limited to 'transport')
-rw-r--r-- | transport/ib-verbs/src/ib-verbs.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/transport/ib-verbs/src/ib-verbs.c b/transport/ib-verbs/src/ib-verbs.c index b43f942ec9e..98d084d6621 100644 --- a/transport/ib-verbs/src/ib-verbs.c +++ b/transport/ib-verbs/src/ib-verbs.c @@ -33,6 +33,8 @@ #include "ib-verbs.h" #include <signal.h> +static int gf_ib_connfail_log; + int32_t gf_resolve_ip6 (const char *hostname, uint16_t port, @@ -2015,9 +2017,11 @@ tcp_connect_finish (transport_t *this) } if (ret == -1 && errno != EINPROGRESS) { - gf_log (this->xl->name, GF_LOG_ERROR, - "tcp connect to %s failed (%s)", - this->peerinfo.identifier, strerror (errno)); + GF_LOG_OCCASIONALLY (gf_ib_connfail_log, + this->xl->name, GF_LOG_ERROR, + "tcp connect to %s failed (%s)", + this->peerinfo.identifier, + strerror (errno)); error = 1; } } |