From a1330ecbd01a0f6701aea99ff3420c44f00373bc Mon Sep 17 00:00:00 2001 From: pavel Date: Tue, 1 Sep 2020 01:04:08 +0200 Subject: [PATCH] replace SOL_TCP with IPPROTO_TCP --- lib/puma/server.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/puma/server.rb b/lib/puma/server.rb index b9fa8f68..9e3ce90c 100644 --- a/lib/puma/server.rb +++ b/lib/puma/server.rb @@ -104,7 +104,6 @@ module Puma RbConfig::CONFIG['host_os'] =~ /linux/ && Socket.const_defined?(:IPPROTO_TCP) && Socket.const_defined?(:TCP_CORK) && - Socket.const_defined?(:SOL_TCP) && Socket.const_defined?(:TCP_INFO) end private :tcp_cork_supported? @@ -140,7 +139,7 @@ module Puma return false unless @precheck_closing begin - tcp_info = socket.getsockopt(Socket::SOL_TCP, Socket::TCP_INFO) + tcp_info = socket.getsockopt(Socket::IPPROTO_TCP, Socket::TCP_INFO) rescue IOError, SystemCallError Thread.current.purge_interrupt_queue if Thread.current.respond_to? :purge_interrupt_queue @precheck_closing = false