1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

pipe: fix memleak if failed to sent samples

This commit is contained in:
Steffen Vogel 2018-05-26 02:33:41 +02:00
parent 26c567e8cb
commit 4a581a5e84

View file

@ -160,10 +160,10 @@ static void * send_loop(void *ctx)
}
sent = node_write(node, smps, scanned);
if (sent < 0) {
if (sent < 0)
warn("Failed to sent samples to node %s: reason=%d", node_name(node), sent);
continue;
}
else if (sent < scanned)
warn("Failed to sent %d out of %d samples to node %s", scanned-sent, scanned, node_name(node));
sample_put_many(smps, ready);