Skip to content

Commit

Permalink
revert unnecessary change
Browse files Browse the repository at this point in the history
  • Loading branch information
kt3k committed Oct 1, 2024
1 parent 60b3f37 commit 17bb2c4
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions ext/net/raw.rs
Original file line number Diff line number Diff line change
Expand Up @@ -333,10 +333,7 @@ pub fn take_network_stream_resource(
if let Ok(resource_rc) = resource_table.take::<TcpStreamResource>(stream_rid)
{
// This TCP connection might be used somewhere else.
let resource: crate::io::FullDuplexResource<
tokio::net::tcp::OwnedReadHalf,
tokio::net::tcp::OwnedWriteHalf,
> = Rc::try_unwrap(resource_rc)
let resource = 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)?;
Expand Down

0 comments on commit 17bb2c4

Please sign in to comment.