Permalink
Browse files

Merge pull request #187 from nelgau/really-disable-nodelay

Ensure TCP_NODELAY is disabled by fixing namespacing
  • Loading branch information...
2 parents 9575098 + 18ebd5d commit 7f57ef861e20504c2422d5810787ee690d81735c @michaelklishin michaelklishin committed Feb 14, 2014
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/bunny/cruby/socket.rb
@@ -16,7 +16,7 @@ class Socket < TCPSocket
def self.open(host, port, options = {})
Timeout.timeout(options[:socket_timeout], ClientTimeout) do
sock = new(host, port)
- if Socket.constants.include?('TCP_NODELAY') || Socket.constants.include?(:TCP_NODELAY)
+ if ::Socket.constants.include?('TCP_NODELAY') || ::Socket.constants.include?(:TCP_NODELAY)
sock.setsockopt(::Socket::IPPROTO_TCP, ::Socket::TCP_NODELAY, true)
end
sock.setsockopt(::Socket::SOL_SOCKET, ::Socket::SO_KEEPALIVE, true) if options.fetch(:keepalive, true)

0 comments on commit 7f57ef8

Please sign in to comment.