diff --git a/lib/node.c b/lib/node.c index d89671655..410c0c1f0 100644 --- a/lib/node.c +++ b/lib/node.c @@ -614,12 +614,8 @@ int node_write(struct node *n, struct sample *smps[], unsigned cnt, unsigned *re while (cnt - nsent > 0) { tosend = MIN(cnt - nsent, node_type(n)->vectorize); sent = node_type(n)->write(n, &smps[nsent], tosend, release); - if (sent < 0) { - warning("Failed to send samples to node %s: reason=%d", node_name(n), sent); + if (sent < 0) return sent; - } - else if (sent < tosend) - warning("Failed to send %d out of %d samples to node %s", tosend-sent, tosend, node_name(n)); nsent += sent; debug(LOG_NODE | 5, "Sent %u samples to node %s", sent, node_name(n)); @@ -627,13 +623,8 @@ int node_write(struct node *n, struct sample *smps[], unsigned cnt, unsigned *re } else { nsent = node_type(n)->write(n, smps, cnt, release); - if (nsent < 0) { - warning("Failed to send samples to node %s: reason=%d", node_name(n), nsent); + if (nsent < 0) return nsent; - } - else if (nsent < cnt) - warning("Failed to send %d out of %d samples to node %s", cnt-nsent, cnt, node_name(n)); - debug(LOG_NODE | 5, "Sent %u samples to node %s", nsent, node_name(n)); }