onepub-dev / dcli

An extensive library and tooling for building console/cli applications and scripts using the Dart programming language.
242 stars 28 forks source link

fetch command causes script to take a long time to complete. #123

Closed bsutton closed 3 years ago

bsutton commented 3 years ago

If you use the fetch function then the dcli script will pause for some seconds before it shuts down.

I'm guessing we are leaving a future hanging.

bsutton commented 3 years ago

So the problem is that the listener is not draining down the http request.

calling request.drain fixes the lag but surely the listener should be draining the request.

bsutton commented 3 years ago

We can see that the listener is downloading the entire file as it is the correct result.

bsutton commented 3 years ago

I've raised a stackoverflow question:

https://stackoverflow.com/questions/65443175/dart-httpclient-with-subscription-causes-delayed-shutdown

bsutton commented 3 years ago

Fixed in 0.39.4