Skip to content

Commit 0c85622

Browse files
carenasgitster
authored andcommitted
daemon: remove unnecesary restriction for listener fd
Since df076bd ([PATCH] GIT: Listen on IPv6 as well, if available., 2005-07-23), any file descriptor assigned to a listening socket was validated to be within the range to be used in an FDSET later. 6573faf (NO_IPV6 support for git daemon, 2005-09-28), moves to use poll() instead of select(), that doesn't have that restriction, so remove the original check. Signed-off-by: Carlo Marcelo Arenas Belón <[email protected]> Acked-by: Phillip Wood <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent f93ff17 commit 0c85622

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

daemon.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -990,11 +990,6 @@ static int setup_named_sock(char *listen_addr, int listen_port, struct socketlis
990990
sockfd = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol);
991991
if (sockfd < 0)
992992
continue;
993-
if (sockfd >= FD_SETSIZE) {
994-
logerror("Socket descriptor too large");
995-
close(sockfd);
996-
continue;
997-
}
998993

999994
#ifdef IPV6_V6ONLY
1000995
if (ai->ai_family == AF_INET6) {

0 commit comments

Comments
 (0)