async-rest 0.10.0 → 0.10.1

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: 1a406ea0610d8c9f964d11b6c53881ef9e34b02a49dce5db69e35786f005c17e
4
- data.tar.gz: 9f993dccfca870612bb7a30ea84a8ad566606cf6cbbd951891cd4861820c12b9
3
+ metadata.gz: 7532e90b101d5977772c3471fcbe2e9981677e2459e90f0c385c6ffab0c7c48c
4
+ data.tar.gz: 36d2b5804bcfde6a3938752fc7b68f0b1af011fdfc6b9910d032431e76b90bb4
5
5
  SHA512:
6
- metadata.gz: 148b577baeb3606ad99ee9fe2211f91150e2d047e17b84f8c61f4ffc53642765375ef0cfc3048e173ca36f74542f6f511160e7ec9ac64abe62b8396c32faf28f
7
- data.tar.gz: 7cdf063ca9b4b228452e1502a552a74d7aabaff4ac625394498c75bc1bdfc3df7fef7414db19c050ff540000540432d4cf819d7a56c195ea5d0176920e5221dc
6
+ metadata.gz: 6b9d994df5534243476a9fc4cb02d523f1a12ad12310ff4b637574543d37288f142b3909dfc01725a5ba5978abb0e0d1ea8d8767110c14a7a376c5e9f6a0a2dc
7
+ data.tar.gz: fb8ac27b1b95768dbb89638a2f13c48865360e8f15b11df0991c712a0fdebc912d24d487e3191b8223952948b4c8a389fc1c794b01b32b74760e3294888e07ad
@@ -75,7 +75,14 @@ module Async
75
75
 
76
76
  response = @resource.call(request)
77
77
 
78
- process_response(request, response)
78
+ # If we exit this block because of an exception, we close the response. This ensures we don't have any dangling connections.
79
+ begin
80
+ return process_response(request, response)
81
+ rescue
82
+ response.close
83
+
84
+ raise
85
+ end
79
86
  end
80
87
  end
81
88
 
@@ -39,6 +39,7 @@ module Async
39
39
  @headers = headers
40
40
  end
41
41
 
42
+ # @param endpoint [Async::HTTP::Endpoint] used to connect to the remote system and specify the base path.
42
43
  def self.connect(endpoint)
43
44
  reference = ::Protocol::HTTP::Reference.parse(endpoint.path)
44
45
 
@@ -20,6 +20,6 @@
20
20
 
21
21
  module Async
22
22
  module REST
23
- VERSION = "0.10.0"
23
+ VERSION = "0.10.1"
24
24
  end
25
25
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: async-rest
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.0
4
+ version: 0.10.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-08-11 00:00:00.000000000 Z
11
+ date: 2019-08-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: async-http