puma-simon 3.7.1 → 3.7.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/puma/const.rb +1 -1
- data/lib/puma/server.rb +6 -5
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '054908b8cd8cd59810255d001bc597d3f2070263'
|
4
|
+
data.tar.gz: 93611b3f19e40b1c3b0a417ef217c3fba63bb8db
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bfa0b6ad51f592d90370c72004644241ec9d1314519e58c25607e51ce89b20663123bdb7eca7217799e62c1f1a804a9f8ce23b9be4f42c30f942aee5c723b9ba
|
7
|
+
data.tar.gz: eb009d2070825d8eb29f5fe1460192d022a672675bb19ee53668d6ecbbf9bd10d46925944d04808c23093e09bf5c96113d819cebf621a20b597e8870c7e77339
|
data/lib/puma/const.rb
CHANGED
@@ -95,7 +95,7 @@ module Puma
|
|
95
95
|
# too taxing on performance.
|
96
96
|
module Const
|
97
97
|
|
98
|
-
PUMA_VERSION = VERSION = "3.7.
|
98
|
+
PUMA_VERSION = VERSION = "3.7.2".freeze
|
99
99
|
CODE_NAME = "Snowy Sagebrush".freeze
|
100
100
|
PUMA_SERVER_STRING = ['puma', PUMA_VERSION, CODE_NAME].join(' ').freeze
|
101
101
|
|
data/lib/puma/server.rb
CHANGED
@@ -28,9 +28,6 @@ module Puma
|
|
28
28
|
include Puma::Const
|
29
29
|
extend Puma::Delegation
|
30
30
|
|
31
|
-
# TCP_TIME_WAIT: 6, TCP_CLOSE: 7, TCP_CLOSE_WAIT: 8, TCP_LAST_ACK: 9
|
32
|
-
IGNORED_CHECK_CLIENT_SOCKET_STATES = (6..9)
|
33
|
-
|
34
31
|
attr_reader :thread
|
35
32
|
attr_reader :events
|
36
33
|
attr_accessor :app
|
@@ -103,6 +100,8 @@ module Puma
|
|
103
100
|
# packetizes our stream. This improves both latency and throughput.
|
104
101
|
#
|
105
102
|
if RUBY_PLATFORM =~ /linux/
|
103
|
+
UNPACK_TCP_STATE_FROM_TCP_INFO = "C".freeze
|
104
|
+
|
106
105
|
# 6 == Socket::IPPROTO_TCP
|
107
106
|
# 3 == TCP_CORK
|
108
107
|
# 1/0 == turn on/off
|
@@ -121,9 +120,11 @@ module Puma
|
|
121
120
|
end
|
122
121
|
|
123
122
|
def closed_socket?(socket)
|
123
|
+
return false unless socket.kind_of? TCPSocket
|
124
124
|
tcp_info = socket.getsockopt(Socket::SOL_TCP, Socket::TCP_INFO)
|
125
|
-
state = tcp_info.unpack(
|
126
|
-
|
125
|
+
state = tcp_info.unpack(UNPACK_TCP_STATE_FROM_TCP_INFO)[0]
|
126
|
+
# TIME_WAIT: 6, CLOSE: 7, CLOSE_WAIT: 8, LAST_ACK: 9, CLOSING: 11
|
127
|
+
(state >= 6 && state <= 9) || state == 11
|
127
128
|
end
|
128
129
|
else
|
129
130
|
def cork_socket(socket)
|