Skip to content

Commit 5ac5aec

Browse files
author
pseusys
committed
reclient
1 parent b5b6b88 commit 5ac5aec

1 file changed

Lines changed: 7 additions & 9 deletions

File tree

typhoon/src/flow/client.rs

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -104,16 +104,14 @@ impl<T: IdentityType + Clone + 'static, AE: AsyncExecutor + 'static> FlowManager
104104
notified_packet.unwrap()
105105
};
106106

107-
{
107+
let incoming_packet = {
108108
let mut lock = self.receive_internal.lock().await;
109-
match lock.process_incoming(notified_packet, self.settings.pool())? {
110-
ProcessIncomingResult::Valid(result) => return Ok(result),
111-
ProcessIncomingResult::Decoy => continue,
112-
ProcessIncomingResult::Unexpected(pkt) => {
113-
drop(lock);
114-
self.probe_handler.lock().await.process(pkt, None).await;
115-
}
116-
}
109+
lock.process_incoming(notified_packet, self.settings.pool())?
110+
};
111+
if let ProcessIncomingResult::Unexpected(pkt) = incoming_packet {
112+
self.probe_handler.lock().await.process(pkt, None).await;
113+
} else if let ProcessIncomingResult::Valid(result) = incoming_packet {
114+
return Ok(result);
117115
}
118116
}
119117
}

0 commit comments

Comments
 (0)