Skip to content

Commit

Permalink
fix: tcp tracing may ignore some incoming icmp responses (#407)
Browse files Browse the repository at this point in the history
  • Loading branch information
fujiapple852 committed Jan 26, 2023
1 parent 95d5f59 commit 953522f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/tracing/net/channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,10 @@ impl Network for TracerChannel {
fn recv_probe(&mut self) -> TraceResult<Option<ProbeResponse>> {
match self.protocol {
TracerProtocol::Icmp | TracerProtocol::Udp => self.recv_icmp_probe(),
TracerProtocol::Tcp => Ok(self.recv_tcp_sockets()?.or(self.recv_icmp_probe()?)),
TracerProtocol::Tcp => match self.recv_tcp_sockets()? {
None => self.recv_icmp_probe(),
resp => Ok(resp),
},
}
}
}
Expand Down

0 comments on commit 953522f

Please sign in to comment.