Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions dc/s2n-quic-dc/src/stream/socket/fd/tcp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,3 @@ where
unsafe { libc::sendmsg(fd, &msg, flags) }
} as _)
}

#[inline]
pub fn shutdown<T>(fd: &T) -> io::Result<()>
where
T: AsRawFd,
{
libc_call(|| unsafe { libc::shutdown(fd.as_raw_fd(), libc::SHUT_WR) as _ })?;
Ok(())
}
4 changes: 2 additions & 2 deletions dc/s2n-quic-dc/src/stream/socket/tokio/tcp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ impl Socket for TcpStream {

#[inline]
fn send_finish(&self) -> io::Result<()> {
// AsyncWrite::poll_shutdown requires a `&mut self` so we just use libc directly
tcp::shutdown(self)
// Since we authenticate socket closures, no need to also shutdown the TCP layer
Ok(())
}
}
Loading