From: Florian Forster Date: Sat, 14 Nov 2009 09:15:03 +0000 (+0100) Subject: erlang plugin: Don't exit if "erl_accept" indicates an error. X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=11f774e60aa0a6a6e205debe60c3376a355d8818;p=collectd.git erlang plugin: Don't exit if "erl_accept" indicates an error. This happens for example when a client uses an incorrect cookie. --- diff --git a/src/erlang.c b/src/erlang.c index 65d8f9ea..93b24416 100644 --- a/src/erlang.c +++ b/src/erlang.c @@ -911,9 +911,10 @@ void *listen_thread (void *arg) /* {{{ */ fd = erl_accept (listen, &conn); if (fd < 0) { - ERROR ("erlang plugin: erl_accept failed with status %i.", fd); - close (listen); - exit (EXIT_FAILURE); + char errbuf[1024]; + ERROR ("erlang plugin: erl_accept failed: %s", + sstrerror (erl_errno, errbuf, sizeof (errbuf))); + continue; } DEBUG ("erlang plugin: Got connection from %s on fd %i.", conn.nodename, fd);