src/rrd_daemon.c: Don't report end-of-file as an error.
authorFlorian Forster <octo@leeloo.home.verplant.org>
Tue, 24 Jun 2008 12:42:47 +0000 (14:42 +0200)
committerFlorian Forster <octo@leeloo.home.verplant.org>
Tue, 24 Jun 2008 12:42:47 +0000 (14:42 +0200)
src/rrd_daemon.c

index bd9db79..0e2d2df 100644 (file)
@@ -620,7 +620,11 @@ static int handle_request (int fd) /* {{{ */
   int status;
 
   status = read (fd, buffer, sizeof (buffer));
-  if (status < 1)
+  if (status == 0)
+  {
+    return (1);
+  }
+  else if (status < 0)
   {
     RRDD_LOG (LOG_ERR, "handle_request: read(2) failed.");
     return (-1);