projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fc7eb73
)
apcups plugin: Close the socket when `connect' failes.
author
Florian Forster
<octo@huhu.verplant.org>
Wed, 19 Jul 2006 16:41:36 +0000
(18:41 +0200)
committer
Florian Forster
<octo@huhu.verplant.org>
Wed, 19 Jul 2006 16:41:36 +0000
(18:41 +0200)
Otherwise people will get `Too many open files' faily soon.
src/apcups.c
patch
|
blob
|
history
diff --git
a/src/apcups.c
b/src/apcups.c
index
9117bda
..
f7486f5
100644
(file)
--- a/
src/apcups.c
+++ b/
src/apcups.c
@@
-208,6
+208,7
@@
static int net_open (char *host, char *service, int port)
if (status != 0) /* `connect(2)' failed */
{
DBG ("connect failed: %s", strerror (errno));
+ close (sd);
return (-1);
}