Skip to content

Commit 80c1be0

Browse files
AaronChen0zonyitoo
authored andcommitted
chore: fix a warning
1 parent 43bf70f commit 80c1be0

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

crates/shadowsocks-service/src/server/tcprelay.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ use shadowsocks::{
1515
net::{AcceptOpts, TcpStream as OutboundTcpStream},
1616
relay::tcprelay::{ProxyServerStream, utils::copy_encrypted_bidirectional},
1717
};
18-
use socket2::SockRef;
1918
use tokio::{
2019
io::{AsyncReadExt, AsyncWriteExt},
2120
net::TcpStream as TokioTcpStream,
@@ -166,7 +165,7 @@ impl TcpServerClient {
166165

167166
// tokio's TcpStream.set_linger was marked as deprecated.
168167
// But we set linger(0), which won't block the thread when close() the socket.
169-
let _ = SockRef::from(&stream).set_linger(Some(Duration::ZERO));
168+
let _ = socket2::SockRef::from(&stream).set_linger(Some(Duration::ZERO));
170169

171170
return Ok(());
172171
}

0 commit comments

Comments
 (0)