excon 0.70.0 → 0.71.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/excon/connection.rb +8 -0
- data/lib/excon/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f6db50174258d3704a3bdb5cbf58cc57846d8e56f8ed55adf7e8c3f5f66f3d15
|
4
|
+
data.tar.gz: 25d3d6d365d53f0197fc45e0ea698ff2b9015d58666b25a76731fe0ebc1a9918
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cae59c2aee4eee7db9363176b63edb3e05ba9c10da29c0ce22edeb7fe623e088173f87e998cc683e2a72c2545e513461deffccb4aace8f4f5a97fd6193519e42
|
7
|
+
data.tar.gz: 111b4548cd53a299b6518c2227e4db03ba939c03f8d934cf2452c35d0a25caeb6ee0f5855481663c0ff886cf37695304769730e67cebfad9b4800a4b5098593a
|
data/lib/excon/connection.rb
CHANGED
@@ -262,6 +262,11 @@ module Excon
|
|
262
262
|
|
263
263
|
datum[:connection] = self
|
264
264
|
|
265
|
+
# cleanup data left behind on persistent connection after interrupt
|
266
|
+
if datum[:persistent] && !@persistent_socket_reusable
|
267
|
+
reset
|
268
|
+
end
|
269
|
+
|
265
270
|
datum[:stack] = datum[:middlewares].map do |middleware|
|
266
271
|
lambda {|stack| middleware.new(stack)}
|
267
272
|
end.reverse.inject(self) do |middlewares, middleware|
|
@@ -270,7 +275,9 @@ module Excon
|
|
270
275
|
datum = datum[:stack].request_call(datum)
|
271
276
|
|
272
277
|
unless datum[:pipeline]
|
278
|
+
@persistent_socket_reusable = false
|
273
279
|
datum = response(datum)
|
280
|
+
@persistent_socket_reusable = true
|
274
281
|
|
275
282
|
if datum[:persistent]
|
276
283
|
if key = datum[:response][:headers].keys.detect {|k| k.casecmp('Connection') == 0 }
|
@@ -344,6 +351,7 @@ module Excon
|
|
344
351
|
if old_socket = sockets.delete(@socket_key)
|
345
352
|
old_socket.close rescue nil
|
346
353
|
end
|
354
|
+
@persistent_socket_reusable = true
|
347
355
|
end
|
348
356
|
|
349
357
|
# Generate HTTP request verb methods
|
data/lib/excon/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: excon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.71.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- dpiddy (Dan Peterson)
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2019-12-
|
13
|
+
date: 2019-12-12 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rspec
|