puma 3.8.1 → 3.8.2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of puma might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a4b092d06bbb74d2735cfd3f481f563c5125bcd5
4
- data.tar.gz: 57b467e1eb4eb262a8b558bb57e32d0b2a1a4f30
3
+ metadata.gz: 7b623ac72b5bea3525cc1c76bd48385e0eef0a17
4
+ data.tar.gz: d5a2ec55bef9deb959e22faa6c077e7b323a7834
5
5
  SHA512:
6
- metadata.gz: b71754de00668f9be0df78f69c08c306d6920715203fd3c9ffd60f01fb43d132aa4658607c71123756370dcebad5f07a957ba0f455c81073d3ea275de44c2463
7
- data.tar.gz: ffb7c6abf49bc3842038c7ca393931070e86411d5023b17deea9ce1f35080facd973ae48eebbbf6d636a1556f27977f91aea0938f87b432ff9e5fe1e67163c3e
6
+ metadata.gz: 33c903e1d88e6552d8146a9fd1a829f8c6e8f15d131ec37854d29025952186a9cafda9204b89d12682f3905973bb8c6c0606948587e34b36b62d24c16ad5572b
7
+ data.tar.gz: d4137246420030c7e1deb7988c7cf15f20b8543211d6c1ef6fae240092941aeeae60c53353d81d8aa7b62064410119f4e4a80d8427b16a5d6c98d4a6fe51b495
data/History.md CHANGED
@@ -1,18 +1,23 @@
1
+ ## 3.8.2 / 2017-03-14
2
+
3
+ * 1 bugfix:
4
+ * Deal with getsockopt with TCP\_INFO failing for sockets that say they're TCP but aren't really. (#1241)
5
+
1
6
  ## 3.8.1 / 2017-03-10
2
7
 
3
- * bugfixes:
8
+ * 1 bugfix:
4
9
  * Remove method call to method that no longer exists (#1239)
5
10
 
6
11
  ## 3.8.0 / 2017-03-09
7
12
 
8
- * bugfixes:
13
+ * 2 bugfixes:
9
14
  * Port from rack handler does not take precedence over config file in Rails 5.1.0.beta2+ and 5.0.1.rc3+ (#1234)
10
15
  * The `tmp/restart.txt` plugin no longer restricts the user from running more than one server from the same folder at a time (#1226)
11
16
 
12
- * features:
17
+ * 1 feature:
13
18
  * Closed clients are aborted to save capacity (#1227)
14
19
 
15
- * Refactors
20
+ * 1 refactor:
16
21
  * Bundler is no longer a dependency from tests (#1213)
17
22
 
18
23
  ## 3.7.1 / 2017-02-20
@@ -36,7 +41,7 @@
36
41
  * Minor refactor on Thread pool (#1088)
37
42
  * Removed a ton of unused constants, variables and files.
38
43
  * Use MRI macros when allocating heap memory
39
- * Use hooks for on_booted event. (#1160)
44
+ * Use hooks for on\_booted event. (#1160)
40
45
 
41
46
  * 14 bugfixes:
42
47
  * Add eof? method to NullIO? (#1169)
@@ -95,7 +95,7 @@ module Puma
95
95
  # too taxing on performance.
96
96
  module Const
97
97
 
98
- PUMA_VERSION = VERSION = "3.8.1".freeze
98
+ PUMA_VERSION = VERSION = "3.8.2".freeze
99
99
  CODE_NAME = "Sassy Salamander".freeze
100
100
  PUMA_SERVER_STRING = ['puma', PUMA_VERSION, CODE_NAME].join(' ').freeze
101
101
 
@@ -78,6 +78,8 @@ module Puma
78
78
  ENV['RACK_ENV'] ||= "development"
79
79
 
80
80
  @mode = :http
81
+
82
+ @precheck_closing = true
81
83
  end
82
84
 
83
85
  attr_accessor :binder, :leak_stack_on_error
@@ -121,10 +123,18 @@ module Puma
121
123
 
122
124
  def closed_socket?(socket)
123
125
  return false unless socket.kind_of? TCPSocket
124
- tcp_info = socket.getsockopt(Socket::SOL_TCP, Socket::TCP_INFO)
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
126
+ return false unless @precheck_closing
127
+
128
+ begin
129
+ tcp_info = socket.getsockopt(Socket::SOL_TCP, Socket::TCP_INFO)
130
+ rescue IOError, SystemCallError
131
+ @precheck_closing = false
132
+ false
133
+ else
134
+ state = tcp_info.unpack(UNPACK_TCP_STATE_FROM_TCP_INFO)[0]
135
+ # TIME_WAIT: 6, CLOSE: 7, CLOSE_WAIT: 8, LAST_ACK: 9, CLOSING: 11
136
+ (state >= 6 && state <= 9) || state == 11
137
+ end
128
138
  end
129
139
  else
130
140
  def cork_socket(socket)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: puma
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.8.1
4
+ version: 3.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Evan Phoenix
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-03-10 00:00:00.000000000 Z
11
+ date: 2017-03-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rdoc
@@ -64,14 +64,14 @@ dependencies:
64
64
  requirements:
65
65
  - - "~>"
66
66
  - !ruby/object:Gem::Version
67
- version: '3.15'
67
+ version: '3.14'
68
68
  type: :development
69
69
  prerelease: false
70
70
  version_requirements: !ruby/object:Gem::Requirement
71
71
  requirements:
72
72
  - - "~>"
73
73
  - !ruby/object:Gem::Version
74
- version: '3.15'
74
+ version: '3.14'
75
75
  description: Puma is a simple, fast, threaded, and highly concurrent HTTP 1.1 server
76
76
  for Ruby/Rack applications. Puma is intended for use in both development and production
77
77
  environments. In order to get the best throughput, it is highly recommended that
@@ -197,7 +197,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
197
197
  version: '0'
198
198
  requirements: []
199
199
  rubyforge_project:
200
- rubygems_version: 2.6.8
200
+ rubygems_version: 2.5.1
201
201
  signing_key:
202
202
  specification_version: 4
203
203
  summary: Puma is a simple, fast, threaded, and highly concurrent HTTP 1.1 server for