snoyberg / http-enumerator

HTTP client package with enumerator interface and HTTPS support.
27 stars 9 forks source link

Do not leak sockets inside catchError. #45

Closed meteficha closed 12 years ago

meteficha commented 12 years ago

I really don't know if what I did is the right thing to do. On my test case [1] it works like a charm. I'd be delighted if you could take a deeper look into this issue.

Thanks!

[1] I use 'throwError' to interrupt the HTTP request when I've processed all the bits of the body that I wanted. This avoids downloading the whole thing when I don't need it.

snoyberg commented 12 years ago

We've opened up some discussions via email to figure out how to best address this issue. Meanwhile, this patch looks like a good fix for the immediate problem.