@cryptotaxi247 / netdata-1 / commits / d48eb69fc

more descriptive streaming error messages

Costa Tsaousis (ktsaou) committed Sep 7, 2017 at 02:46 UTC d48eb69fc79730acf3272ebd45d5901b41c05d51
1 file changed +3 -3
src/rrdpush.c
+3 -3
@@ -504,19 +504,19 @@ void *rrdpush_sender_thread(void *ptr) {
504
505 if(unlikely(ofd->revents & POLLERR)) {
506 debug(D_STREAM, "STREAM: Send failed (POLLERR) - closing socket...");
507 - error("STREAM %s [send to %s]: connection reports errors (POLLERR) - we have sent %zu bytes on this connection.", host->hostname, connected_to, sent_connection);
507 + error("STREAM %s [send to %s]: connection reports errors (POLLERR), closing it - we have sent %zu bytes on this connection.", host->hostname, connected_to, sent_connection);
508 close(host->rrdpush_socket);
509 host->rrdpush_socket = -1;
510 }
511 else if(unlikely(ofd->revents & POLLHUP)) {
512 debug(D_STREAM, "STREAM: Send failed (POLLHUP) - closing socket...");
513 - error("STREAM %s [send to %s]: connection closed (POLLHUP) - we have sent %zu bytes on this connection.", host->hostname, connected_to, sent_connection);
513 + error("STREAM %s [send to %s]: connection closed by remote end (POLLHUP) - we have sent %zu bytes on this connection.", host->hostname, connected_to, sent_connection);
514 close(host->rrdpush_socket);
515 host->rrdpush_socket = -1;
516 }
517 else if(unlikely(ofd->revents & POLLNVAL)) {
518 debug(D_STREAM, "STREAM: Send failed (POLLNVAL) - closing socket...");
519 - error("STREAM %s [send to %s]: connection is invalid (POLLNVAL) - we have sent %zu bytes on this connection.", host->hostname, connected_to, sent_connection);
519 + error("STREAM %s [send to %s]: connection is invalid (POLLNVAL), closing it - we have sent %zu bytes on this connection.", host->hostname, connected_to, sent_connection);
520 close(host->rrdpush_socket);
521 host->rrdpush_socket = -1;
522 }