Skip to content

Commit

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


Expand Down

0 comments on commit dda826a

Please sign in to comment.