croservices / cro-http

HTTP (including HTTPS and HTTP/2) support for the Cro library for building distributed systems in Raku.
https://cro.services/
Artistic License 2.0
49 stars 26 forks source link

Fix HTTP1.1 pipeline teardown #190

Closed patrickbkr closed 9 months ago

patrickbkr commented 11 months ago

The teardown can be triggered by a connection close of the remote side. This sends a LAST at the bottom of the supply pipeline. That last needs to bubble up the supply chain and arrive in Cro::HTTP::Client (possibly also applies to the server) for it to tear down its pipeline. Otherwise the supply chain will for the most part be torn down and further emits of requests will sit forever in the topmost Supply::Preserving which then has no taps. The symptom without this fix is that a pipeline that the remote end closed (i.e. hasn't been used for 60 seconds or so) will cause all subsequent uses of that pipeline to error out with

Exceeded timeout for headers when attempting to access http://foop