Missing constant Read: #<NameError: uninitialized constant Puma::Server::UNPACK_TCP_STATE_FROM_TCP_INFO> on platforms that have no 'tcp_cork_support?' and do have 'closed_socket_supported?'
https://stackoverflow.com/questions/66088219/pumaserverunpack-tcp-state-from-tcp-info/66214024#66214024
In file lib/puma/server.rb is the following construct:
if tcp_cork_supported?
UNPACK_TCP_STATE_FROM_TCP_INFO = "C".freeze
# ...
end
if closed_socket_supported?
# ...
state = tcp_info.unpack(UNPACK_TCP_STATE_FROM_TCP_INFO)[0]
end
If tcp_cork_supported? is FALSE and closed_socket_supported? is TRUE, an uninitialized constant Puma::Server::UNPACK_TCP_STATE_FROM_TCP_INFO is used!
Is it a problem to move 'UNPACK_TCP_STATE_FROM_TCP_INFO = "C".freeze' outside the if condition?
Missing constant
Read: #<NameError: uninitialized constant Puma::Server::UNPACK_TCP_STATE_FROM_TCP_INFO>on platforms that have no 'tcp_cork_support?' and do have 'closed_socket_supported?'https://stackoverflow.com/questions/66088219/pumaserverunpack-tcp-state-from-tcp-info/66214024#66214024
In file
lib/puma/server.rbis the following construct:If tcp_cork_supported? is FALSE and closed_socket_supported? is TRUE, an uninitialized constant Puma::Server::UNPACK_TCP_STATE_FROM_TCP_INFO is used!
Is it a problem to move 'UNPACK_TCP_STATE_FROM_TCP_INFO = "C".freeze' outside the if condition?