- From: Yutaka Hirano <notifications@github.com>
- Date: Tue, 25 Sep 2018 19:00:54 -0700
- To: whatwg/fetch <fetch@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Wednesday, 26 September 2018 02:01:15 UTC
While it's not implemented I think auto cancellation is useful for users. It is very easy to forget to read all data or abort the pending fetch. > fetch(url); // This will leak! Please note that, even if you get a response, you need to read all the response body. > let resp = await fetch(url); > const headers = resp.headers; > resp = null; // This will leak! I've seen this pattern many times in WPTs. Also, the backpressure mechanism makes the situation worse, as it will keep the pending fetch indefinitely. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/whatwg/fetch/issues/810#issuecomment-424559270
Received on Wednesday, 26 September 2018 02:01:15 UTC