diff options
author | Eric Wong <normalperson@yhbt.net> | 2010-10-05 00:13:02 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2010-10-05 00:31:26 +0000 |
commit | 29946368c45dce5da116adb426362ee93c507c4e (patch) | |
tree | bef89c7838ee2165c21f4416f0309e678a0f8d9a /lib/unicorn/socket_helper.rb | |
parent | 9ef6b6f551a34922cfd831e2521495e89afe2f94 (diff) | |
download | unicorn-29946368c45dce5da116adb426362ee93c507c4e.tar.gz |
This should hopefully make the non-blocking accept() situation more tolerable under Ruby 1.9.2.
Diffstat (limited to 'lib/unicorn/socket_helper.rb')
-rw-r--r-- | lib/unicorn/socket_helper.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/unicorn/socket_helper.rb b/lib/unicorn/socket_helper.rb index 1d03eab..7364937 100644 --- a/lib/unicorn/socket_helper.rb +++ b/lib/unicorn/socket_helper.rb @@ -126,12 +126,12 @@ module Unicorn end old_umask = File.umask(opt[:umask] || 0) begin - UNIXServer.new(address) + Kgio::UNIXServer.new(address) ensure File.umask(old_umask) end elsif address =~ /^(\d+\.\d+\.\d+\.\d+):(\d+)$/ - TCPServer.new($1, $2.to_i) + Kgio::TCPServer.new($1, $2.to_i) else raise ArgumentError, "Don't know how to bind: #{address}" end @@ -166,9 +166,9 @@ module Unicorn def server_cast(sock) begin Socket.unpack_sockaddr_in(sock.getsockname) - TCPServer.for_fd(sock.fileno) + Kgio::TCPServer.for_fd(sock.fileno) rescue ArgumentError - UNIXServer.for_fd(sock.fileno) + Kgio::UNIXServer.for_fd(sock.fileno) end end |