]> Zhao Yanbai Git Server - minix.git/commitdiff
Close UDP socket after error.
authorPhilip Homburg <philip@cs.vu.nl>
Wed, 15 Aug 2007 12:50:24 +0000 (12:50 +0000)
committerPhilip Homburg <philip@cs.vu.nl>
Wed, 15 Aug 2007 12:50:24 +0000 (12:50 +0000)
commands/syslogd/syslogd.c

index 4225e17e29fb072c713d24fd95e91aa7ad185afd..bf2b27c845a368673953027d573319b4d205d89b 100644 (file)
@@ -900,7 +900,11 @@ int main(int argc, char **argv)
 
                } else if (len < 0) {   /* Got an error or signal while reading */
                        if (errno != EINTR)     /* */
+                       {
                                logerror("Receive error from UDP channel");
+                               close(nfd);
+                               nfd= -1;
+                       }
 
                } else {        /* (len == 0) Channel has been closed */
                        logerror("UDP channel has closed");