chiark / gitweb /
journald: allow zero length datagrams again
authorLennart Poettering <lennart@poettering.net>
Tue, 13 Jan 2015 18:43:16 +0000 (19:43 +0100)
committerLennart Poettering <lennart@poettering.net>
Tue, 13 Jan 2015 19:17:06 +0000 (20:17 +0100)
This undoes a small part of 13790add4bf648fed816361794d8277a75253410
which was erroneously added, given that zero length datagrams are OK,
and hence zero length reads on a SOCK_DGRAM be no means mean EOF.

src/journal/journald-server.c

index e0a078e..5999724 100644 (file)
@@ -1182,10 +1182,6 @@ int server_process_datagram(sd_event_source *es, int fd, uint32_t revents, void
                         log_error_errno(errno, "recvmsg() failed: %m");
                         return -errno;
                 }
-                if (n == 0) {
-                        log_error("Got EOF on socket.");
-                        return -ECONNRESET;
-                }
 
                 for (cmsg = CMSG_FIRSTHDR(&msghdr); cmsg; cmsg = CMSG_NXTHDR(&msghdr, cmsg)) {