Skip to content

Commit

Permalink
Remove unnecessary async function
Browse files Browse the repository at this point in the history
  • Loading branch information
SajjadPourali committed Mar 27, 2024
1 parent 4deb660 commit 3fefa74
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
Binary file added j
Binary file not shown.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ impl IpStack {
Vacant(entry) => {
match packet.transport_protocol(){
IpStackPacketProtocol::Tcp(h) => {
match IpStackTcpStream::new(packet.src_addr(),packet.dst_addr(),h, pkt_sender.clone(),config.mtu,config.tcp_timeout).await{
match IpStackTcpStream::new(packet.src_addr(),packet.dst_addr(),h, pkt_sender.clone(),config.mtu,config.tcp_timeout){
Ok(stream) => {
entry.insert(stream.stream_sender());
accept_sender.send(IpStackStream::Tcp(stream))?;
Expand Down
2 changes: 1 addition & 1 deletion src/stream/tcp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ pub struct IpStackTcpStream {
}

impl IpStackTcpStream {
pub(crate) async fn new(
pub(crate) fn new(
src_addr: SocketAddr,
dst_addr: SocketAddr,
tcp: TcpPacket,
Expand Down

0 comments on commit 3fefa74

Please sign in to comment.