connection_pool 2.1.1 → 2.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Changes.md +8 -0
- data/lib/connection_pool/timed_stack.rb +6 -0
- data/lib/connection_pool/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cba01c34d4f2ac4cd9beb4d71ade9808e66095a0
|
4
|
+
data.tar.gz: 541e73dc97f93b16a7a2725be6157395a76b2295
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d2d9e0deee042e07bd04a4715c97d67bc0c6d59fc6670a307a740024d7ff38ad6fe46dbe9edc482bdef7d6ed51abaeb5297df1a3664c6ec26ba0f2d0e51512c7
|
7
|
+
data.tar.gz: 2dbf1090f068f706141e92aae4dfefb1f596e96be621e0ad1d4e4824c9abae734f337d7ea2e4c5d7943f612835f4ca429469347f1270359c4e604033329dabc4
|
data/Changes.md
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
2.1.2
|
2
|
+
------
|
3
|
+
|
4
|
+
- The connection\_pool will now close any connections which respond to
|
5
|
+
`close` (Dalli) or `disconnect!` (Redis). This ensures discarded connections
|
6
|
+
from the fix in 2.1.1 are torn down ASAP and don't linger open.
|
7
|
+
|
8
|
+
|
1
9
|
2.1.1
|
2
10
|
------
|
3
11
|
|
@@ -126,6 +126,12 @@ class ConnectionPool::TimedStack
|
|
126
126
|
if @shutdown_block
|
127
127
|
@shutdown_block.call(obj)
|
128
128
|
else
|
129
|
+
# try to shut down the connection before throwing it away
|
130
|
+
if obj.respond_to?(:close) # Dalli::Client
|
131
|
+
obj.close rescue nil
|
132
|
+
elsif obj.respond_to?(:disconnect!) # Redis
|
133
|
+
obj.disconnect! rescue nil
|
134
|
+
end
|
129
135
|
@created -= 1
|
130
136
|
end
|
131
137
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: connection_pool
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Perham
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-
|
12
|
+
date: 2015-03-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|