Skip to content

Is there a way to disable the persistant plugin in the faraday adapter? #16

Answered by HoneyryderChuck
m-arav asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @m-arav ,

You can disable persistence of connections by setting the persistent option to false:

# while setting yourr faraday conn
conn.adapter :httpx, persistent: false

That sucks, your use-case is actually something I mention as a caveat when using the persistent plugin in the wiki.

I've enabled persistent connections in the faraday adapter because I thought that it would serve the majority of use-cases, as most faraday users complain about it not reusing tcp connections for same-origin requests by default (I believe the faraday maintainers maintain a page listing adapters with socket persistence support).

My assessment may be wrong here, and there may be more faraday users which pre…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@m-arav
Comment options

@HoneyryderChuck
Comment options

Answer selected by m-arav
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants