Author: mav
Date: Mon Apr  6 18:56:02 2015
New Revision: 281163
URL: https://svnweb.freebsd.org/changeset/base/281163

Log:
  Make ctld to not exit on ECONNABORTED on accept().
  
  That is not really an error for the main process.
  
  MFC after:    1 week
  Sponsored by: iXsystems, Inc.

Modified:
  head/usr.sbin/ctld/ctld.c

Modified: head/usr.sbin/ctld/ctld.c
==============================================================================
--- head/usr.sbin/ctld/ctld.c   Mon Apr  6 18:45:41 2015        (r281162)
+++ head/usr.sbin/ctld/ctld.c   Mon Apr  6 18:56:02 2015        (r281163)
@@ -2399,8 +2399,11 @@ found:
                                        client_fd = accept(portal->p_socket,
                                            (struct sockaddr *)&client_sa,
                                            &client_salen);
-                                       if (client_fd < 0)
+                                       if (client_fd < 0) {
+                                               if (errno == ECONNABORTED)
+                                                       continue;
                                                log_err(1, "accept");
+                                       }
                                        assert(client_salen >= 
client_sa.ss_len);
 
                                        handle_connection(portal, client_fd,
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to