Permalink
Browse files

Fix for connection reset

  • Loading branch information...
1 parent f20e473 commit dda826a0fc2d61b24619613026cb609613e9f620 @adamburmister adamburmister committed May 17, 2011
Showing with 6 additions and 8 deletions.
  1. +6 −5 lib/backchat_resource.rb
  2. +0 −3 lib/backchat_resource/connection.rb
View
@@ -58,10 +58,11 @@ def self.setup(api_key, logger = nil)
# Enable debugging output if configured
if BackchatResource::CONFIG["api"]["debug"]
class ActiveResource::Connection
- def http
- http = Net::HTTP.new(@site.host, @site.port)
- http.set_debug_output $stderr
- return http
- end
+ alias_method :old_http, :http
+ def http
+ c = old_http
+ c.set_debug_output $stderr
+ return c
+ end
end
end
@@ -18,9 +18,6 @@ class Connection
alias_method :old_request, :request
# Makes a request to the remote service.
def request(method, path, *arguments)
- #puts "#" * 100
- #puts "caller: #{caller.join("\n")}"
- #puts "#" * 100
if (BackchatResource::CONFIG["api"]["cache"] || false)
cache_key = cache_key(method, path, *arguments)

0 comments on commit dda826a

Please sign in to comment.