Author: mav
Date: Mon Apr 13 09:18:56 2015
New Revision: 281488
URL: https://svnweb.freebsd.org/changeset/base/281488

Log:
  MFC r281163: Make ctld to not exit on ECONNABORTED on accept().
  
  That is not really an error for the main process.

Modified:
  stable/10/usr.sbin/ctld/ctld.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.sbin/ctld/ctld.c
==============================================================================
--- stable/10/usr.sbin/ctld/ctld.c      Mon Apr 13 09:17:57 2015        
(r281487)
+++ stable/10/usr.sbin/ctld/ctld.c      Mon Apr 13 09:18:56 2015        
(r281488)
@@ -2382,8 +2382,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-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"

Reply via email to