excon 0.7.3 → 0.7.4
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of excon might be problematic. Click here for more details.
- data/changelog.txt +5 -0
- data/excon.gemspec +2 -2
- data/lib/excon/constants.rb +1 -1
- data/lib/excon/socket.rb +9 -1
- metadata +4 -4
data/changelog.txt
CHANGED
data/excon.gemspec
CHANGED
@@ -13,8 +13,8 @@ Gem::Specification.new do |s|
|
|
13
13
|
## If your rubyforge_project name is different, then edit it and comment out
|
14
14
|
## the sub! line in the Rakefile
|
15
15
|
s.name = 'excon'
|
16
|
-
s.version = '0.7.
|
17
|
-
s.date = '2011-09-
|
16
|
+
s.version = '0.7.4'
|
17
|
+
s.date = '2011-09-30'
|
18
18
|
s.rubyforge_project = 'excon'
|
19
19
|
|
20
20
|
## Make sure your summary is short. The description may be as long
|
data/lib/excon/constants.rb
CHANGED
data/lib/excon/socket.rb
CHANGED
@@ -39,7 +39,7 @@ module Excon
|
|
39
39
|
def read(max_length)
|
40
40
|
begin
|
41
41
|
until @read_buffer.length >= max_length
|
42
|
-
@read_buffer << @socket.read_nonblock(
|
42
|
+
@read_buffer << @socket.read_nonblock(max_length - @read_buffer.length)
|
43
43
|
end
|
44
44
|
rescue OpenSSL::SSL::SSLError => error
|
45
45
|
if error.message == 'read would block'
|
@@ -66,6 +66,14 @@ module Excon
|
|
66
66
|
max_length = [@write_buffer.length, Excon::CHUNK_SIZE].min
|
67
67
|
written = @socket.write_nonblock(@write_buffer.slice(0, max_length))
|
68
68
|
@write_buffer.slice!(0, written)
|
69
|
+
rescue OpenSSL::SSL::SSLError => error
|
70
|
+
if error.message == 'write would block'
|
71
|
+
if IO.select(nil, [@socket], nil, @connection_params[:write_timeout])
|
72
|
+
retry
|
73
|
+
else
|
74
|
+
raise(Excon::Errors::Timeout.new("write timeout reached"))
|
75
|
+
end
|
76
|
+
end
|
69
77
|
rescue Errno::EAGAIN, Errno::EWOULDBLOCK
|
70
78
|
if IO.select(nil, [@socket], nil, @connection_params[:write_timeout])
|
71
79
|
retry
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: excon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 11
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 7
|
9
|
-
-
|
10
|
-
version: 0.7.
|
9
|
+
- 4
|
10
|
+
version: 0.7.4
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- geemus (Wesley Beary)
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-09-
|
18
|
+
date: 2011-09-30 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: open4
|