Skip to content

Commit

Permalink
Add Adapter#close so that derived classes can call super.
Browse files Browse the repository at this point in the history
  • Loading branch information
ioquatix authored Dec 23, 2019
1 parent 073bc25 commit 5a417d9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/faraday/adapter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ def connection(env)
yield conn
end

# Close any persistent connections. The adapter should still be usable after calling close.
def close
end

def call(env)
env.clear_body if env.needs_body?
env.response = Response.new
Expand Down

0 comments on commit 5a417d9

Please sign in to comment.