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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f544e4ada780c8d862ffb1a1801df2d0fed5f14c258afbd42b5da2c1fc8a824c
4
- data.tar.gz: 7cb809bb8db7676b90e1eedd10a9a74f7b9961ad60be7879dfbd28f6e52869d7
3
+ metadata.gz: f6db50174258d3704a3bdb5cbf58cc57846d8e56f8ed55adf7e8c3f5f66f3d15
4
+ data.tar.gz: 25d3d6d365d53f0197fc45e0ea698ff2b9015d58666b25a76731fe0ebc1a9918
5
5
  SHA512:
6
- metadata.gz: b6fe99cf66b166e4d331bd99dde897e026a87c8369ad6303bdb9fe15a60aa7e6ad636f2fdc447c1564eba55f8913d8bdb109636ca44f7a1d9733a2d9321b22ef
7
- data.tar.gz: 24a9927d282a35921db9815cfaf60960c55d6cfedcd96b590c0e9d7bc6dffa1ad7630e7d122a95f73ecc0bad882da6cc4629a3f948ecae8ddcbc86feb9a3d74b
6
+ metadata.gz: cae59c2aee4eee7db9363176b63edb3e05ba9c10da29c0ce22edeb7fe623e088173f87e998cc683e2a72c2545e513461deffccb4aace8f4f5a97fd6193519e42
7
+ data.tar.gz: 111b4548cd53a299b6518c2227e4db03ba939c03f8d934cf2452c35d0a25caeb6ee0f5855481663c0ff886cf37695304769730e67cebfad9b4800a4b5098593a
@@ -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
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Excon
3
- VERSION = '0.70.0'
3
+ VERSION = '0.71.0'
4
4
  end
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.70.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-02 00:00:00.000000000 Z
13
+ date: 2019-12-12 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rspec