httpclient gem -- closing connections

J

Jonathan Rochkind

Anyone use the httpclient gem?

It keeps http connections where the server allows it open, to allow
reuse of connections, which is great for efficiency.

But I'm confused about if I _have_ to make sure to manually close them
all when I'm done.

If I don't ever close them, and just let the object be (eventually, who
knows when) garbage collected... is this bad? What will happen to all
my connections?

If I do need to close them all... what's the best way to do that? That
makes my code a lot more complicated, as I need to make sure to put in a
hook at the end of every (in this case Rails) action that knows about
any outstanding http clients and closes all their connections.

Any advice appreciated. I wasn't able to find any listserv or author
contact address specifically for this gem.

Jonathan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top