diff options
Diffstat (limited to 'pcp/PCPMetric.c')
-rw-r--r-- | pcp/PCPMetric.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/pcp/PCPMetric.c b/pcp/PCPMetric.c index d1afc801..f6d4c97b 100644 --- a/pcp/PCPMetric.c +++ b/pcp/PCPMetric.c @@ -164,7 +164,10 @@ bool PCPMetric_fetch(struct timeval* timestamp) { pmFreeResult(pcp->result); pcp->result = NULL; } - int sts = pmFetch(pcp->totalMetrics, pcp->fetch, &pcp->result); + int sts, count = 0; + do { + sts = pmFetch(pcp->totalMetrics, pcp->fetch, &pcp->result); + } while (sts == PM_ERR_IPC && ++count < 3); if (sts < 0) { if (pmDebugOptions.appl0) fprintf(stderr, "Error: cannot fetch metric values: %s\n", |