From d619dd7cc605f8a525d171a9da9272b0b5307c51 Mon Sep 17 00:00:00 2001 From: Alex Li Date: Thu, 20 Jun 2024 09:11:12 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=9A=20Rename?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dio/lib/src/adapters/io_adapter.dart | 4 ++-- plugins/http2_adapter/lib/src/http2_adapter.dart | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dio/lib/src/adapters/io_adapter.dart b/dio/lib/src/adapters/io_adapter.dart index cfdd26ae2..cbe19879c 100644 --- a/dio/lib/src/adapters/io_adapter.dart +++ b/dio/lib/src/adapters/io_adapter.dart @@ -104,9 +104,9 @@ class IOHttpClientAdapter implements HttpClientAdapter { request = await reqFuture; } - final wr = WeakReference(request); + final requestWR = WeakReference(request); cancelFuture?.whenComplete(() { - wr.target?.abort(); + requestWR.target?.abort(); }); // Set Headers diff --git a/plugins/http2_adapter/lib/src/http2_adapter.dart b/plugins/http2_adapter/lib/src/http2_adapter.dart index fc08ceb8d..77c747d2f 100644 --- a/plugins/http2_adapter/lib/src/http2_adapter.dart +++ b/plugins/http2_adapter/lib/src/http2_adapter.dart @@ -288,7 +288,7 @@ class Http2Adapter implements HttpClientAdapter { onClose: () { responseSubscription.cancel(); responseSink.close(); - stream.outgoingMessages.close(); + streamWR.target?.outgoingMessages.close(); }, ); }