From a32ea23dea7ae7dd98b44b0aeed5328eebd6e89d Mon Sep 17 00:00:00 2001 From: Yoshiya Hinosawa Date: Thu, 26 Sep 2024 13:26:53 +0900 Subject: [PATCH] fmt --- ext/net/raw.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ext/net/raw.rs b/ext/net/raw.rs index f67557c567..c4a3f243c3 100644 --- a/ext/net/raw.rs +++ b/ext/net/raw.rs @@ -329,10 +329,11 @@ pub fn take_network_stream_resource( // The stream we're attempting to unwrap may be in use somewhere else. If that's the case, we cannot proceed // with the process of unwrapping this connection, so we just return a bad resource error. // See also: https://github.com/denoland/deno/pull/16242 + if let Ok(resource_rc) = resource_table.take::(stream_rid) { // This TCP connection might be used somewhere else. - let resource = Rc::try_unwrap(resource_rc) + let resource: crate::io::FullDuplexResource = Rc::try_unwrap(resource_rc) .map_err(|_| bad_resource("TCP stream is currently in use"))?; let (read_half, write_half) = resource.into_inner(); let tcp_stream = read_half.reunite(write_half)?;