mirror of
https://github.com/puma/puma.git
synced 2022-11-09 13:48:40 -05:00
Define UNPACK_TCP_STATE_FROM_TCP_INFO in the right place (#2588)
This fixes the issue for me when I run Puma in FreeBSD using Vagrant. Close https://github.com/puma/puma/issues/2556
This commit is contained in:
parent
403975b372
commit
15b0794392
1 changed files with 2 additions and 2 deletions
|
@ -137,8 +137,6 @@ module Puma
|
|||
# socket parameter may be an MiniSSL::Socket, so use to_io
|
||||
#
|
||||
if tcp_cork_supported?
|
||||
UNPACK_TCP_STATE_FROM_TCP_INFO = "C".freeze
|
||||
|
||||
# 6 == Socket::IPPROTO_TCP
|
||||
# 3 == TCP_CORK
|
||||
# 1/0 == turn on/off
|
||||
|
@ -168,6 +166,8 @@ module Puma
|
|||
end
|
||||
|
||||
if closed_socket_supported?
|
||||
UNPACK_TCP_STATE_FROM_TCP_INFO = "C".freeze
|
||||
|
||||
def closed_socket?(socket)
|
||||
return false unless socket.kind_of? TCPSocket
|
||||
return false unless @precheck_closing
|
||||
|
|
Loading…
Reference in a new issue