feat: reset
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
use std::net::SocketAddr;
|
||||
use std::time::Duration;
|
||||
use tokio::io::AsyncWriteExt;
|
||||
use tokio::net::TcpSocket;
|
||||
|
||||
@@ -23,5 +24,7 @@ async fn connect_and_reset(addr: SocketAddr) -> Result<(), String> {
|
||||
{
|
||||
return Err(e.to_string());
|
||||
}
|
||||
// cause reset
|
||||
stream.set_linger(Some(Duration::from_millis(0))).ok();
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user