Commit f38aacd1 authored by nanamicat's avatar nanamicat

tcp

parent 4180f23f
Pipeline #41962 canceled with stages
in 1 minute and 29 seconds
......@@ -67,9 +67,9 @@ fn main() -> Result<()> {
.filter(|&r| r.config.schema == Schema::TCP && r.config.dst_port == 0)
.unique_by(|r| r.config.src_port)
{
s.spawn(|s| {
let socket = router.listen_tcp().unwrap();
s.spawn(move |s| {
// listen 或 accept 出错直接 panic
let socket = router.listen_tcp().unwrap();
loop {
let (connection, _) = socket.accept().unwrap();
s.spawn(move |_| {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment