1
0
Fork 0
mirror of https://github.com/puma/puma.git synced 2022-11-09 13:48:40 -05:00

listen to unix socket with provided backlog if any

This commit is contained in:
Vanchi Koduvayur 2016-02-17 14:55:32 -08:00
parent 32913e79c6
commit 5a3764987e

View file

@ -111,6 +111,7 @@ module Puma
umask = nil
mode = nil
backlog = nil
if uri.query
params = Util.parse_query uri.query
@ -122,9 +123,13 @@ module Puma
if u = params['mode']
mode = Integer('0'+u)
end
if u = params['backlog']
backlog = Integer(u)
end
end
io = add_unix_listener path, umask, mode
io = add_unix_listener path, umask, mode, backlog
end
@listeners << [str, io]
@ -298,7 +303,7 @@ module Puma
# Tell the server to listen on +path+ as a UNIX domain socket.
#
def add_unix_listener(path, umask=nil, mode=nil)
def add_unix_listener(path, umask=nil, mode=nil, backlog=nil)
@unix_paths << path
# Let anyone connect by default
@ -319,6 +324,7 @@ module Puma
end
s = UNIXServer.new(path)
s.listen backlog if backlog
@ios << s
ensure
File.umask old_mask