Code

write_graphite plugin: Don't call close() on invalid file descriptors.
authorFlorian Forster <octo@collectd.org>
Sat, 13 Jul 2013 05:42:18 +0000 (07:42 +0200)
committerFlorian Forster <octo@collectd.org>
Sat, 13 Jul 2013 05:42:52 +0000 (07:42 +0200)
src/write_graphite.c

index 11e09a2a8f45568e93012c71d0c61683f0164eef..aa87896f7bf5c504c53c3cd3d2d547f3bf004a7f 100644 (file)
@@ -220,7 +220,6 @@ static int wg_callback_init (struct wg_callback *cb)
                 "write_graphite plugin: Connecting to %s:%s failed. "
                 "The last error was: %s", node, service,
                 sstrerror (errno, errbuf, sizeof (errbuf)));
                 "write_graphite plugin: Connecting to %s:%s failed. "
                 "The last error was: %s", node, service,
                 sstrerror (errno, errbuf, sizeof (errbuf)));
-        close (cb->sock_fd);
         return (-1);
     }
     else
         return (-1);
     }
     else