Skip to content

Fix connection reuse

Patrick Böker requested to merge patrickbkr/http-tiny:connection-reuse into master

All the bits were already there, just the actual reuse didn't happen.

Please review! It feels a bit strange for something so obvious to have gone unnoticed. Maybe it's me that misses something!

Also please do consider, that doing connection reuse does open the door for a race condition when the remote end closes the connection at the same time one tries to reuse the connection. Not sure this is something HTTP::Tiny should handle for the user (by detecting and retrying) or is better left to the user. (I recently fixed that very issue in Cro::HTTP, that's why I'm sensible for it.)

Merge request reports