toland / patron

Ruby HTTP client based on libcurl
http://toland.github.com/patron/
MIT License
541 stars 74 forks source link

Document and clean up connection reuse #169

Closed julik closed 5 years ago

julik commented 5 years ago

During a recent investigation we had questions whether Patron is actually keepalive-friendly. It turned out that it totally is, but there are a few bits which can be made less tricky than they were. So:

Lazy initialization, although economical, can lead to strange situations with debugging, and as there already is a lifecycle we observe (alloc/free via MRI C API) we can just as well init the libCURL handle there