Commit d3001d52b84fe0bdde5a5d9829e49f6ce54ddec6

back out of non-blocking Socket#accept

Commit diff

script/git-daemon

 
4343 end
4444
4545 def run
46 begin
47 while session = @socket.accept_nonblock
48 connections = $children_active - $children_reaped
49 if connections > MAX_CHILDREN
50 log(Process.pid, "too many active children #{connections}/#{MAX_CHILDREN}")
51 session.close
52 next
53 end
54
55 run_service(session)
46 while session = @socket.accept
47 connections = $children_active - $children_reaped
48 if connections > MAX_CHILDREN
49 log(Process.pid, "too many active children #{connections}/#{MAX_CHILDREN}")
50 session.close
51 next
5652 end
57 rescue Errno::EAGAIN, Errno::ECONNABORTED, Errno::EPROTO, Errno::EINTR
58 IO.select([@socket])
59 retry
53
54 run_service(session)
6055 end
6156 end
6257
toggle raw diff