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

replace SOL_TCP with IPPROTO_TCP

This commit is contained in:
pavel 2020-09-01 01:04:08 +02:00
parent 2710a6a071
commit a1330ecbd0

View file

@ -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