mjfreshyfresh-mini_fb 0.1.12 → 0.1.13

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/mini_fb.rb +8 -4
  2. metadata +2 -2
data/lib/mini_fb.rb CHANGED
@@ -159,12 +159,16 @@ module MiniFB
159
159
  kwargs["sig"] = Digest::MD5.hexdigest( arg_string + secret.value.call )
160
160
 
161
161
  # Call website with POST request
162
+ attempt = 0
162
163
  begin
163
- response = Net::HTTP.post_form( URI.parse(FB_URL), kwargs )
164
- rescue SocketError => err
165
- raise IOError.new( "Cannot connect to the facebook server: " + err )
164
+ response = Net::HTTP.post_form( URI.parse(FB_URL), kwargs )
165
+ rescue SocketError, Errno::ECONNRESET => err
166
+ attempt += 1
167
+ retry if attempt == 1
168
+ # raise IOError.new( "Cannot connect to the facebook server: " + err )
169
+ raise
166
170
  end
167
-
171
+
168
172
  # Handle response
169
173
  return response.body if custom_format
170
174
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mjfreshyfresh-mini_fb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.12
4
+ version: 0.1.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Travis Reeder
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2010-01-20 00:00:00 -08:00
13
+ date: 2010-01-21 00:00:00 -08:00
14
14
  default_executable:
15
15
  dependencies: []
16
16