diff --git a/lib/copperegg/util.rb b/lib/copperegg/util.rb
index <HASH>..<HASH> 100644
--- a/lib/copperegg/util.rb
+++ b/lib/copperegg/util.rb
@@ -48,11 +48,24 @@ module CopperEgg
         request = Net::HTTP::Post.new(uri.request_uri)
         request.body = MultiJson.dump(params)
       end
-      
+
       request.basic_auth(apikey, "U")
       request["Content-Type"] = "application/json"
-      response = http.request(request)
-      if response.code != "200"
+
+      connect_try_count = 0
+      response = nil
+      begin
+        response = http.request(request)
+      rescue Exception => e
+        connect_try_count += 1
+        if connect_try_count > 1
+          log "#{e.inspect}"
+        end
+        sleep 0.5
+      retry
+      end
+
+      if response == nil || response.code != "200"
         return nil
       end
       if type == "get"
Added exception-handling around http.request